]> git.pond.sub.org Git - empserver/commit
Make generation numbers catch more potential yields on input
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 11 Apr 2011 19:37:23 +0000 (21:37 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 14 Apr 2011 18:21:23 +0000 (20:21 +0200)
commite3cf1e3280f9a2729e0b7005a04648a5e8abbbf9
tree90e94cacce424b80d2b0f856ca99fc523fe32086
parent47b68a1c1fd268291f257965617699165b9f17c2
Make generation numbers catch more potential yields on input

getstarg(), snxtitem() and snxtsct() can yield the processor, because
they call getstring().  But only for null or empty arguments.  For
other arguments, we should call ef_make_stale(), to catch errors.
Problem: if a caller never passes null or empty arguments, it may rely
on these functions not yielding.  We'd get false positives.  In
general, we can't know whether that's the case.  But we do know in the
common special case of player arguments.  Call ef_make_stale() for
those.
include/prototypes.h
src/lib/player/player.c
src/lib/subs/getstarg.c
src/lib/subs/onearg.c
src/lib/subs/snxtitem.c
src/lib/subs/snxtsct.c