Fixed condition pointed out by Uwe Bonnes:
authorOliver Hartkopp <socketcan@hartkopp.net>
Thu, 26 Jun 2008 14:35:46 +0000 (14:35 +0000)
committerOliver Hartkopp <socketcan@hartkopp.net>
Thu, 26 Jun 2008 14:35:46 +0000 (14:35 +0000)
https://lists.berlios.de/pipermail/socketcan-core/2008-June/001625.html

canplayer.c

index f1d6d7e..799a64a 100644 (file)
@@ -346,7 +346,7 @@ int main(int argc, char **argv)
                                if (buf[j] == '=')
                                        break;
                        }
-                       if (buf[j] != '=') {
+                       if ((j == BUFSZ) || (buf[j] != '=')) {
                                fprintf(stderr, "'=' missing in assignment!\n");
                                print_usage(basename(argv[0]));
                                return 1;