fix null termination of client desktop string matching
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 13 Mar 2014 14:28:33 +0000 (10:28 -0400)
committerMike Blumenkrantz <zmike@samsung.com>
Thu, 13 Mar 2014 14:28:33 +0000 (10:28 -0400)
CID 1155274

src/bin/e_client.c

index 597632d..6b28f39 100644 (file)
@@ -1915,7 +1915,7 @@ _e_client_eval(E_Client *ec)
                     {
                        char *s;
 
-                       strncpy(buf, ec->icccm.class, sizeof(buf));
+                       strncpy(buf, ec->icccm.class, sizeof(buf) - 1);
                        s = buf;
                        eina_str_tolower(&s);
                        if (strcmp(s, ec->icccm.class))