patch-pop_c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --- pop.c.orig Thu Apr 13 07:08:02 2000
  2. +++ pop.c Sun Apr 24 22:44:14 2011
  3. @@ -38,7 +38,7 @@
  4. case 0: /* Timeout */ \
  5. return -1; \
  6. } \
  7. - sscanf(input, "%5s", strg); \
  8. + sscanf(input, "%4s", strg); \
  9. if (strcmp(strg, ACK_MSG) != 0) \
  10. return -1; \
  11. }
  12. @@ -170,7 +170,7 @@ int pop3(int sd, int *nm, int *om, char *user, char *p
  13. case 0: /* Timeout */
  14. return -1;
  15. }
  16. - sscanf(input, "%5s", strg);
  17. + sscanf(input, "%4s", strg);
  18. if (strcmp(strg, ACK_MSG) == 0) {
  19. /* LIST works */
  20. pnt = input + strlen(strg) + 1;
  21. @@ -210,21 +210,21 @@ int pop(char *string, int *nmail, int *oldmail)
  22. /* Parse the string */
  23. /* Servername */
  24. pnt = string + 2;
  25. - if (sscanf(pnt, "%100s", server) != 1) {
  26. + if (sscanf(pnt, "%99s", server) != 1) {
  27. InDuty = 0;
  28. return -1;
  29. }
  30. /* Username */
  31. pnt += strlen(server) + 1;
  32. - if (sscanf(pnt, "%100s", user) != 1) {
  33. + if (sscanf(pnt, "%99s", user) != 1) {
  34. InDuty = 0;
  35. return -1;
  36. }
  37. /* Password */
  38. pnt += strlen(user) + 1;
  39. - if (sscanf(pnt, "%100s", password) != 1) {
  40. + if (sscanf(pnt, "%99s", password) != 1) {
  41. InDuty = 0;
  42. return -1;
  43. }
  44. @@ -239,7 +239,7 @@ int pop(char *string, int *nmail, int *oldmail)
  45. /* optional mailboxname for IMAP */
  46. if (type == TYPE_IMAP)
  47. - if (sscanf(pnt, "%100s", &mailbox) != 1)
  48. + if (sscanf(pnt, "%99s", mailbox) != 1)
  49. strcpy(mailbox, "INBOX");
  50. /* Feb. 17 2000: Removed toupper() of mailbox names.