From 6d2e2098d625d57f0064594f61f7464ef6e95816 Mon Sep 17 00:00:00 2001 From: bonkey Date: Thu, 4 May 2000 22:58:33 +0000 Subject: [PATCH] 2c56026bcbb9d42c315503a37605b093 lynx-overflow.patch Changed files: lynx-overflow.patch -> 1.4 --- lynx-overflow.patch | 180 ++------------------------------------------ 1 file changed, 5 insertions(+), 175 deletions(-) diff --git a/lynx-overflow.patch b/lynx-overflow.patch index 6181e25..3d62124 100644 --- a/lynx-overflow.patch +++ b/lynx-overflow.patch @@ -1,6 +1,7 @@ ---- lynx2-8-3/src/LYMail.c.wiget Thu Aug 26 13:31:19 1999 -+++ lynx2-8-3/src/LYMail.c Wed Sep 8 22:36:05 1999 -@@ -398,7 +398,7 @@ +diff -Nru lynx2-8-3.orig/src/LYMail.c lynx2-8-3/src/LYMail.c +--- lynx2-8-3.orig/src/LYMail.c Fri May 5 00:43:18 2000 ++++ lynx2-8-3/src/LYMail.c Fri May 5 00:45:15 2000 +@@ -392,7 +392,7 @@ * entry, if permitted. - FM */ if (!LYNoCc) { @@ -9,97 +10,7 @@ personal_mail_address : "")); self[79] = '\0'; _statusline("Cc: "); -@@ -487,7 +487,7 @@ - #endif - - #else /* !(defined(VMS) || defined(DOSPATH) || defined(SH_EX)) */ -- sprintf(cmd, "%s %s", system_mail, system_mail_flags); -+ snprintf(cmd, sizeof(cmd), "%s %s", system_mail, system_mail_flags); - if ((fd = popen(cmd, "w")) == NULL) { - HTAlert(FORM_MAILTO_FAILED); - FREE(address); -@@ -566,7 +566,7 @@ - /* - * Now set up the command. - FM - */ -- sprintf(cmd, -+ snprintf(cmd, sizeof(cmd), - "%s %s %s,%s ", - system_mail, - system_mail_flags, -@@ -581,7 +581,7 @@ - * - * Possibly still a problem if user supplies long subject. - BL - */ -- sprintf(cmd, -+ snprintf(cmd, sizeof(cmd), - "%s %s%s/subject=\"%s\" %s ", - system_mail, - system_mail_flags, -@@ -616,7 +616,7 @@ - if (!first) { - StrAllocCat(command, ","); - } -- sprintf(cmd, mail_adrs, address_ptr1); -+ snprintf(cmd, sizeof(cmd), mail_adrs, address_ptr1); - StrAllocCat(command, cmd); - first = FALSE; - } -@@ -647,7 +647,7 @@ - if (strlen(address_ptr1) > 3 && - strlen(address_ptr1) + strlen(mail_adrs) < sizeof(cmd)) { - StrAllocCat(command, ","); -- sprintf(cmd, mail_adrs, address_ptr1); -+ snprintf(cmd, sizeof(cmd), mail_adrs, address_ptr1); - if (isPMDF) { - strcat(cmd, "/CC"); - } -@@ -1286,7 +1286,7 @@ - i += 78; - len = strlen((char *)&cp0[i]); - } -- sprintf(cmd, "%s\n", (char *)&cp0[i]); -+ snprintf(cmd,sizeof(cmd), "%s\n", (char *)&cp0[i]); - StrAllocCat(body, cmd); - cp0 = (cp + 1); - } -@@ -1301,7 +1301,7 @@ - len = strlen((char *)&cp0[i]); - } - if (len) { -- sprintf(cmd, "%s\n", (char *)&cp0[i]); -+ snprintf(cmd,sizeof(cmd), "%s\n", (char *)&cp0[i]); - StrAllocCat(body, cmd); - } - FREE(temp); -@@ -1433,7 +1433,7 @@ - if (!LYHaveCJKCharacterSet && - strncasecomp(LYCharSet_UC[current_char_set].MIMEname, "x-", 2) - != 0) { -- sprintf(buf,"Content-Type: text/plain; charset=%s\n", -+ snprintf(buf, sizeof(buf),"Content-Type: text/plain; charset=%s\n", - LYCharSet_UC[current_char_set].MIMEname); - StrAllocCat(header, buf); - } -@@ -1451,7 +1451,7 @@ - StrAllocCat(header, address); - } - StrAllocCat(header, "\n"); -- sprintf(buf, "X-Mailer: Lynx, Version %s\n", LYNX_VERSION); -+ snprintf(buf, sizeof(buf), "X-Mailer: Lynx, Version %s\n", LYNX_VERSION); - StrAllocCat(header, buf); - - if (refid && *refid) { -@@ -1578,7 +1578,7 @@ - addstr("From: "); - #endif /* VMS */ - /* Add the personal mail address if there is one. */ -- sprintf(user_input, "%s", (personal_mail_address ? -+ snprintf(user_input, sizeof(user_input), "%s", (personal_mail_address ? - personal_mail_address : "")); - if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || - term_letter) { -@@ -1617,7 +1617,7 @@ +@@ -1557,7 +1557,7 @@ addstr(CTRL_U_TO_ERASE); addstr(SUBJECT_PROMPT); /* Add the default subject. */ @@ -108,84 +19,3 @@ (subject[0] != '\0') ? subject : ((filename && *filename) ? -@@ -1637,7 +1637,7 @@ - addstr("\n"); - remove_tildes(user_input); - #ifdef VMS -- sprintf(subject, "%.70s", user_input); -+ snprintf(subject, sizeof(subject), "%.70s", user_input); - #else - #ifdef SH_EX - if (mail_is_blat) -@@ -1663,7 +1663,7 @@ - /* - * Add the mail address if there is one. - */ -- sprintf(user_input, "%s", (personal_mail_address ? -+ snprintf(user_input, sizeof(user_input), "%s", (personal_mail_address ? - personal_mail_address : "")); - if (LYgetstr(user_input, VISIBLE, sizeof(user_input), NORECALL) < 0 || - term_letter) { -@@ -1721,7 +1721,7 @@ - /* - * Terminate the header. - */ -- sprintf(buf, "\n"); -+ snprintf(buf, sizeof(buf), "\n"); - StrAllocCat(header, buf); - CTRACE(tfp,"**header==\n%s",header); - #endif /* !VMS */ -@@ -1769,7 +1769,7 @@ - if (strstr(editor, "pico")) { - editor_arg = " -t"; /* No prompt for filename to use */ - } -- sprintf(user_input, "%s%s %s", editor, editor_arg, my_tmpfile); -+ snprintf(user_input, sizeof(user_input), "%s%s %s", editor, editor_arg, my_tmpfile); - _statusline(SPAWNING_EDITOR_FOR_MAIL); - stop_curses(); - if (LYSystem(user_input)) { /* Spawn Editor */ -@@ -1916,7 +1916,7 @@ - /* - * Now set up the command. - FM - */ -- sprintf(cmd, -+ snprintf(cmd, sizeof(cmd), - "%s %s %s,%s ", - system_mail, - system_mail_flags, -@@ -1931,7 +1931,7 @@ - * - * Possibly still a problem if user supplies long subject. - BL - */ -- sprintf(cmd, -+ snprintf(cmd, sizeof(cmd), - "%s %s%s/subject=\"%s\" %s ", - system_mail, - system_mail_flags, -@@ -1966,7 +1966,7 @@ - if (!first) { - StrAllocCat(command, ","); - } -- sprintf(cmd, mail_adrs, address_ptr1); -+ snprintf(cmd, sizeof(cmd), mail_adrs, address_ptr1); - StrAllocCat(command, cmd); - first = FALSE; - } -@@ -1997,7 +1997,7 @@ - if (strlen(address_ptr1) > 3 && - strlen(address_ptr1) + strlen(mail_adrs) < sizeof(cmd)) { - StrAllocCat(command, ","); -- sprintf(cmd, mail_adrs, address_ptr1); -+ snprintf(cmd, sizeof(cmd), mail_adrs, address_ptr1); - if (isPMDF) { - strcat(cmd, "/CC"); - } -@@ -2019,7 +2019,7 @@ - * Send the tmpfile into sendmail. - */ - _statusline(SENDING_YOUR_MSG); -- sprintf(cmd, "%s %s", system_mail, system_mail_flags); -+ snprintf(cmd, sizeof(cmd), "%s %s", system_mail, system_mail_flags); - #if defined(DOSPATH) || defined(WIN_EX) - if ((fp = LYOpenTemp(tmpfile2, ".txt", "w")) == NULL) { - HTAlert(MAILTO_URL_TEMPOPEN_FAILED); -- 2.44.0