]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
Fix confusion between size_t and ssize_t
authorTravis Cross <tc@traviscross.com>
Mon, 25 Jun 2012 06:01:37 +0000 (06:01 +0000)
committerTravis Cross <tc@traviscross.com>
Mon, 25 Jun 2012 06:38:30 +0000 (06:38 +0000)
commitcbde2faab2d7ec245b4b84475abdc8bdbba01c74
tree24bda43f10d0c1aaec282ada48d32a77c51e39dd
parente6629ab5f606c799aa12204dbc307cba1b3a0648
Fix confusion between size_t and ssize_t

readfile returns a value of type ssize_t (signed) and returns -1 if an
error occurs.  In auth_readdb_internal, however, we were assigning the
return value of readfile to a variable of type size_t (unsigned), but
then testing this unsigned value to see if it was < 0, a
contradiction.  We would thus simultaneously fail to report the error
in readfile and would end up with a corrupted length value.
libs/sofia-sip/libsofia-sip-ua/iptsec/auth_module.c