Redisplay & add_control_char_runes

Jerry James james at xemacs.org
Mon Jun 19 18:07:22 EDT 2006


Here's another report from a static checker, but I'm having trouble
determining whether this is one to worry about or not.  In redisplay.c,
take a look at create_string_text_block, starting on line 4588 of the
21.5 code.  A comment near the top remarks that the buffer argument to
be nil, and indeed the local variable named b (which is the
corresponding struct buffer *) is checked for NULL-ness up there.  I
have looked carefully through this code and do not see the value of b
changing anywhere.  This is important, because a checker flagged a use
of b waaaaaaay down on line 4998, where it gets passed to
add_control_char_runes, which immediately dereferences it.

So the question is this: if the buffer argument to
create_string_text_block is null, is it possible to reach line 4998 and,
if so, what should we do about it?
-- 
Jerry James, Assistant Professor        james at xemacs.org
Computer Science Department             http://www.cs.usu.edu/~jerry/
Utah State University




More information about the XEmacs-Beta mailing list