projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93c6246
)
Coverity: Negative Returns: CID 121
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Fri, 20 Jan 2012 03:34:49 +0000
(22:34 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Fri, 20 Jan 2012 03:34:49 +0000
(22:34 -0500)
* src/ui/TTY/objects-tty.c (tty_font_spec_matches_charset): Make
sure to abort in case of invariant violation.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/ui/TTY/objects-tty.c
patch
|
blob
|
history
diff --git
a/src/ui/TTY/objects-tty.c
b/src/ui/TTY/objects-tty.c
index
0be74fa
..
636dcfc
100644
(file)
--- a/
src/ui/TTY/objects-tty.c
+++ b/
src/ui/TTY/objects-tty.c
@@
-501,7
+501,12
@@
tty_font_spec_matches_charset(struct device *d, Lisp_Object charset,
if (!the_nonreloc)
the_nonreloc = XSTRING_DATA(reloc);
fixup_internal_substring(nonreloc, reloc, offset, &length);
+
assert(length>=0);
+ if( length<0 ) {
+ abort();
+ }
+
the_nonreloc += offset;
if (UNBOUNDP(charset))