rawshark: fix test to avoid reading beyond end of format string
rawshark.c:1347:21: note: opposite inner condition: pos>=len if (pos >= len) { /* There should always be a following character */ Change-Id: I2e1c6b3d031db4f658bb579e0c8aba8cac7c5cb5 Reviewed-on: https://code.wireshark.org/review/37475 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
This commit is contained in:
parent
326a43627a
commit
d7f610d776
|
@ -1344,7 +1344,7 @@ parse_field_string_format(gchar *format) {
|
|||
|
||||
while (pos < len) {
|
||||
if (format[pos] == '%') {
|
||||
if (pos >= len) { /* There should always be a following character */
|
||||
if (pos >= (len-1)) { /* There should always be a following specifier character */
|
||||
return FALSE;
|
||||
}
|
||||
pos++;
|
||||
|
|
Loading…
Reference in New Issue