projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
rfc2231.c
diff --git
a/rfc2231.c
b/rfc2231.c
index
f7caea1
..
c3986a4
100644
(file)
--- a/
rfc2231.c
+++ b/
rfc2231.c
@@
-22,6
+22,7
@@
#endif
#include "mutt.h"
#endif
#include "mutt.h"
+#include "ascii.h"
#include "mime.h"
#include "charset.h"
#include "lib/str.h"
#include "mime.h"
#include "charset.h"
#include "lib/str.h"
@@
-145,7
+146,7
@@
void rfc2231_decode_parameters (PARAMETER ** headp)
p->attribute = NULL;
p->value = NULL;
p->attribute = NULL;
p->value = NULL;
-
FREE
(&p);
+
mem_free
(&p);
rfc2231_list_insert (&conthead, conttmp);
}
rfc2231_list_insert (&conthead, conttmp);
}
@@
-164,15
+165,15
@@
void rfc2231_decode_parameters (PARAMETER ** headp)
static struct rfc2231_parameter *rfc2231_new_parameter (void)
{
static struct rfc2231_parameter *rfc2231_new_parameter (void)
{
- return
safe
_calloc (sizeof (struct rfc2231_parameter), 1);
+ return
mem
_calloc (sizeof (struct rfc2231_parameter), 1);
}
static void rfc2231_free_parameter (struct rfc2231_parameter **p)
{
if (*p) {
}
static void rfc2231_free_parameter (struct rfc2231_parameter **p)
{
if (*p) {
-
FREE
(&(*p)->attribute);
-
FREE
(&(*p)->value);
-
FREE
(p);
+
mem_free
(&(*p)->attribute);
+
mem_free
(&(*p)->value);
+
mem_free
(p);
}
}
}
}
@@
-271,7
+272,7
@@
static void rfc2231_join_continuations (PARAMETER ** head,
vl = str_len (par->value);
vl = str_len (par->value);
-
safe
_realloc (&value, l + vl + 1);
+
mem
_realloc (&value, l + vl + 1);
strcpy (value + l, par->value); /* __STRCPY_CHECKED__ */
l += vl;
strcpy (value + l, par->value); /* __STRCPY_CHECKED__ */
l += vl;
@@
-330,7
+331,7
@@
int rfc2231_encode_string (char **pd)
++ext;
if (encode) {
++ext;
if (encode) {
- e =
safe
_malloc (dlen + 2 * ext + str_len (charset) + 3);
+ e =
mem
_malloc (dlen + 2 * ext + str_len (charset) + 3);
sprintf (e, "%s''", charset); /* __SPRINTF_CHECKED__ */
t = e + str_len (e);
for (s = d, slen = dlen; slen; s++, slen--)
sprintf (e, "%s''", charset); /* __SPRINTF_CHECKED__ */
t = e + str_len (e);
for (s = d, slen = dlen; slen; s++, slen--)
@@
-344,16
+345,16
@@
int rfc2231_encode_string (char **pd)
*t = '\0';
if (d != *pd)
*t = '\0';
if (d != *pd)
-
FREE
(&d);
-
FREE
(pd);
+
mem_free
(&d);
+
mem_free
(pd);
*pd = e;
}
else if (d != *pd) {
*pd = e;
}
else if (d != *pd) {
-
FREE
(pd);
+
mem_free
(pd);
*pd = d;
}
*pd = d;
}
-
FREE
(&charset);
+
mem_free
(&charset);
return encode;
}
return encode;
}