Androiddump: Fix Memory - corruptions (OVERRUN) (CID 1293632)

Change-Id: Ifd0d5026d207f763e1726963049acfb5a77f4b39
Reviewed-on: https://code.wireshark.org/review/8075
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
This commit is contained in:
Alexis La Goutte 2015-04-15 12:55:09 +02:00 committed by Michal Labedzki
parent 40ce324f4d
commit 3c110d7bb2
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ static int add_android_interfaces(struct interface_t **interface_list,
pos = strchr(pos, '\t');
result = (int) (pos - prev_pos);
pos = strchr(pos, '\n') + 1;
if (result > (int) sizeof(serial_number)) {
if (result >= (int) sizeof(serial_number)) {
fprintf(stderr, "WARNING: Serial number too long, ignore device\n");
continue;
}