From 34703ac65944c22770a446d1b6f8b0cf23f3c6a3 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Thu, 26 Jun 2008 14:35:46 +0000 Subject: [PATCH] Fixed condition pointed out by Uwe Bonnes: https://lists.berlios.de/pipermail/socketcan-core/2008-June/001625.html --- canplayer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canplayer.c b/canplayer.c index f1d6d7e..799a64a 100644 --- a/canplayer.c +++ b/canplayer.c @@ -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;