Commit 6cd84cb1 6cd84cb1c8ff0fcc1d582db9b79930d2084c9483 by Sergey Poznyakoff

(rfc2047_decode): Bugfix.

1 parent 11d6f79f
...@@ -78,7 +78,7 @@ rfc2047_decode (const char *tocode, const char *input, char **ptostr) ...@@ -78,7 +78,7 @@ rfc2047_decode (const char *tocode, const char *input, char **ptostr)
78 fromcode = strtok_r (start_position + 2, "?", &sp); 78 fromcode = strtok_r (start_position + 2, "?", &sp);
79 encoding_type = strtok_r (NULL, "?", &sp); 79 encoding_type = strtok_r (NULL, "?", &sp);
80 encoded_text = strtok_r (NULL, "?", &sp); 80 encoded_text = strtok_r (NULL, "?", &sp);
81 if (sp[0] != '=') 81 if (sp == NULL || sp[0] != '=')
82 { 82 {
83 status = MU_ERR_BAD_2047_INPUT; 83 status = MU_ERR_BAD_2047_INPUT;
84 break; 84 break;
......