about summary refs log tree commit diff stats
path: root/src/GridText.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2018-05-04 23:29:29 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2018-05-04 23:29:29 +0000
commita1f3e5c0b60d33c7bc6d732638c3beb5281281ae (patch)
tree5e5443e3062df24485c0a45e0399b98020af8b67 /src/GridText.c
parentc6d1fb20cd5a88f3730558a4c9615197df747bf2 (diff)
downloadlynx-snapshots-a1f3e5c0b60d33c7bc6d732638c3beb5281281ae.tar.gz
snapshot of project "lynx", label v2-8-9dev_17h
Diffstat (limited to 'src/GridText.c')
-rw-r--r--src/GridText.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/GridText.c b/src/GridText.c
index 813f03dc..784574b2 100644
--- a/src/GridText.c
+++ b/src/GridText.c
@@ -1,5 +1,5 @@
 /*
- * $LynxId: GridText.c,v 1.311 2018/04/01 14:22:01 tom Exp $
+ * $LynxId: GridText.c,v 1.312 2018/05/04 22:53:37 tom Exp $
  *
  *		Character grid hypertext object
  *		===============================
@@ -10642,7 +10642,7 @@ static void load_a_file(const char *val_used,
 {
     FILE *fd;
     size_t bytes;
-    char buffer[BUFSIZ + 1];
+    char bfr[BUFSIZ + 1];
 
     CTRACE((tfp, "Ok, about to convert \"%s\" to mime/thingy\n", val_used));
 
@@ -10650,8 +10650,8 @@ static void load_a_file(const char *val_used,
 	if ((fd = fopen(val_used, BIN_R)) == 0) {
 	    HTAlert(gettext("Can't open file for uploading"));
 	} else {
-	    while ((bytes = fread(buffer, sizeof(char), BUFSIZ, fd)) != 0) {
-		HTSABCat(result, buffer, (int) bytes);
+	    while ((bytes = fread(bfr, sizeof(char), sizeof(bfr) - 1, fd)) != 0) {
+		HTSABCat(result, bfr, (int) bytes);
 	    }
 	    LYCloseInput(fd);
 	}
@@ -11861,7 +11861,7 @@ int HText_SubmitForm(FormInfo * submit_item, DocInfo *doc,
 	 */
 	if (my_query != 0 &&
 	    my_query->len > 5 &&
-	    !strncmp(my_query->str, "file:", 5)) {
+	    !strncmp(my_query->str, "file:", (size_t) 5)) {
 	    strtok(my_query->str, "?");
 	}
 	if (submit_item->submit_method == URL_POST_METHOD || Boundary) {