Commit 7ba96ca1 7ba96ca17a014cb6aa692cb03419ee324a9b8c51 by Alain Magloire

* imap4d/fetch.c (fetch_bodystructure0): Check for sp != NULL.

	* imap4d/fetch.c (send_parameter_list):  Check for sp != NULL.
1 parent 1799e35d
......@@ -6,6 +6,9 @@
if the call fails no memory should be allocated and the return status
should be return i.e. status != 0.
* imap4d/fetch.c (fetch_bodystructure0): Check for sp != NULL.
* imap4d/fetch.c (send_parameter_list): Check for sp != NULL.
2001-08-23 Sergey Poznyakoff
* mail/msgset.y: Fixed erroneous call to msgset_select
......
......@@ -362,7 +362,7 @@ fetch_internaldate (struct fetch_command *command, char **arg)
envelope_t env = NULL;
struct tm *tptr;
time_t env_time;
(void)arg; /* No arguments. */
message_get_envelope (command->msg, &env);
date[0] = '\0';
......@@ -678,9 +678,9 @@ fetch_bodystructure0 (message_t message, int extension)
/* The extension data for multipart. */
if (extension)
{
while (*sp && isspace ((unsigned)*sp)) sp++;
while (sp && *sp && isspace ((unsigned)*sp)) sp++;
/* body parameter parenthesized list: Content-type parameter list. */
if (*sp)
if (sp && *sp)
{
util_send (" (");
{
......@@ -1471,8 +1471,8 @@ send_parameter_list (char *buffer)
util_send ("(");
s = strtok_r (buffer, " \t\r\n;", &sp);
util_send_qstring (s);
while (*sp && isspace ((unsigned)*sp)) sp++;
if (*sp)
while (sp && *sp && isspace ((unsigned)*sp)) sp++;
if (sp && *sp)
{
int space = 0;
util_send (" (");
......@@ -1502,5 +1502,3 @@ send_parameter_list (char *buffer)
util_send ("NIL");
return 0;
}
......