]> diplodocus.org Git - nmh/commitdiff
Whooops, gcc on OpenBSD noticed a nasty in the last commit.
authorDavid Levine <levinedl@acm.org>
Sun, 22 Dec 2013 21:05:38 +0000 (15:05 -0600)
committerDavid Levine <levinedl@acm.org>
Sun, 22 Dec 2013 21:05:38 +0000 (15:05 -0600)
uip/sendsbr.c

index 96c6b52..6d76e9c 100644 (file)
@@ -613,7 +613,7 @@ mime_type (const char *file_name) {
     if ((int) snprintf (cmd, sizeof cmd, mimetypeproc, file_name) <
         (int) sizeof cmd) {
         if ((fp = popen (cmd, "r")) != NULL) {
     if ((int) snprintf (cmd, sizeof cmd, mimetypeproc, file_name) <
         (int) sizeof cmd) {
         if ((fp = popen (cmd, "r")) != NULL) {
-            if (fgets (buf, sizeof cmd, fp)) {
+            if (fgets (buf, sizeof buf, fp)) {
                 char *cp;
 
                 /* Skip leading <filename>:<whitespace>, if present. */
                 char *cp;
 
                 /* Skip leading <filename>:<whitespace>, if present. */