From: | Nickolai Zeldovich <nickolai@csail.mit.edu> |
Date: | Mon, 17 Dec 2012 18:21:12 -0500 |
Subject: | Some more nits |
To: | krb5-bugs@mit.edu |
On the current git master branch (2af891a5):
src/util/support/utf8_conv.c:281: (len + n < len) is never required to
be true: len is a signed integer, n is known to be >= 1 (from line
279), and overflow for signed integers is undefined behavior. Many
compilers (e.g., gcc) will discard the code from lines 281-282 as a
result.
src/kdc/do_tgs_req.c:884: if state can be NULL, then it should have
been checked before dereferencing state at line 850.
src/kdc/fast_util.c:300: if s can be NULL, then it should have been
checked before dereferencing s at line 298.
src/kdc/fast_util.c:421: if state can be NULL, then it should have
been checked before dereferencing state at line 417.
src/plugins/kdb/db2/libdb2/btree/bt_seq.c:449: h is guaranteed to be
NULL at this point, but it's being dereferenced anyway. Perhaps this
was meant to refer to the previous value of h, before it was
overwritten on line 447?
Nickolai.
src/util/support/utf8_conv.c:281: (len + n < len) is never required to
be true: len is a signed integer, n is known to be >= 1 (from line
279), and overflow for signed integers is undefined behavior. Many
compilers (e.g., gcc) will discard the code from lines 281-282 as a
result.
src/kdc/do_tgs_req.c:884: if state can be NULL, then it should have
been checked before dereferencing state at line 850.
src/kdc/fast_util.c:300: if s can be NULL, then it should have been
checked before dereferencing s at line 298.
src/kdc/fast_util.c:421: if state can be NULL, then it should have
been checked before dereferencing state at line 417.
src/plugins/kdb/db2/libdb2/btree/bt_seq.c:449: h is guaranteed to be
NULL at this point, but it's being dereferenced anyway. Perhaps this
was meant to refer to the previous value of h, before it was
overwritten on line 447?
Nickolai.