PERFORCE change 123086 for review
Andrew Turner
andrew at FreeBSD.org
Sun Jul 8 05:54:10 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123086
Change 123086 by andrew at andrew_hermies on 2007/07/08 05:53:54
When reading past the end of an array return NULL rather then failing an assert
Affected files ...
.. //depot/projects/soc2007/andrew-update/lib/facund_object.c#6 edit
Differences ...
==== //depot/projects/soc2007/andrew-update/lib/facund_object.c#6 (text+ko) ====
@@ -288,7 +288,8 @@
assert(obj != NULL);
assert(obj->obj_type == FACUND_ARRAY);
assert(obj->obj_assigned == 1);
- assert(pos < obj->obj_array_count);
+ if (pos >= obj->obj_array_count)
+ return NULL;
obj->obj_error = FACUND_OBJECT_ERROR_NONE;
return obj->obj_array[pos];
More information about the p4-projects
mailing list