]> diplodocus.org Git - nmh/commitdiff
uip/mhshowsbr.c: Increase buffer size for showing-content command.
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 17 May 2017 16:56:00 +0000 (17:56 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 18 May 2017 11:28:55 +0000 (12:28 +0100)
Experimenting with small BUFSIZ to try and trigger programs caused one
test to fail because the code detected BUFSIZ was too small a string to
hold the command to execute.  Use NMH_BUFSIZ instead.

uip/mhshowsbr.c

index 20de87cc6dce222c927801db7e93ef394e2b7bfd..11ec02b3f8901fc1522ab0740a7f0fb6aaceb41b 100644 (file)
@@ -344,7 +344,7 @@ show_content_aux (CT ct, int alternate, char *cp, char *cracked, struct format *
 {
     int fd;
     int xstdin = 0, xlist = 0;
-    char *file = NULL, buffer[BUFSIZ];
+    char *file = NULL, buffer[NMH_BUFSIZ];
 
     if (!ct->c_ceopenfnx) {
        if (!alternate)