Androiddump: Fix Memory - corruptions (OVERRUN) (CID 1293632)
authorAlexis La Goutte <alexis.lagoutte@gmail.com>
Wed, 15 Apr 2015 10:55:09 +0000 (12:55 +0200)
committerMichal Labedzki <michal.labedzki@tieto.com>
Wed, 15 Apr 2015 20:48:11 +0000 (20:48 +0000)
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>
extcap/androiddump.c

index 070d3e146a23ba27f7c189614383c1610bae6579..22bc99fba68ad5dc5f362a3b89b8baa06505041e 100644 (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;
         }