things that are important: not trying to pass off a format string as a buffer size...
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 16 Jul 2010 20:39:17 +0000 (20:39 +0000)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 16 Jul 2010 20:39:17 +0000 (20:39 +0000)
SVN revision: 50288

src/lib/elm_main.c

index a48f881f1290d35744fb7e3281aafa0b6a1fdcf4..109e0fe3a7c53a7e68241527b300987e310986f6 100644 (file)
@@ -28,7 +28,7 @@ _elm_dangerous_call_check(const char *call)
    char buf[256];
    const char *eval;
    
-   snprintf(buf, "%i.%i.%i.%i", VMAJ, VMIN, VMIC, VREV);
+   snprintf(buf, sizeof(buf), "%i.%i.%i.%i", VMAJ, VMIN, VMIC, VREV);
    eval = getenv("ELM_NO_FINGER_WAGGLING");
    if ((eval) && (!strcmp(eval, buf)))
      return 0;