summaryrefslogtreecommitdiff
path: root/pith/mimedesc.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2015-07-26 23:36:30 -0600
committerEduardo Chappa <chappa@washington.edu>2015-07-26 23:36:30 -0600
commit2695b63fbe6c6a2206a2637137c6cd654f69943a (patch)
tree717008efdac9ae66bf33985dc99ee68aea45bf11 /pith/mimedesc.c
parent36b77661542a63c4579943951d143c8cc9c99460 (diff)
downloadalpine-2695b63fbe6c6a2206a2637137c6cd654f69943a.tar.xz
* Clear even more warnings from clang 3.5 and MAC OSX.
Diffstat (limited to 'pith/mimedesc.c')
-rw-r--r--pith/mimedesc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/pith/mimedesc.c b/pith/mimedesc.c
index 80d2f840..dbe83f18 100644
--- a/pith/mimedesc.c
+++ b/pith/mimedesc.c
@@ -70,8 +70,9 @@ void
describe_mime(struct mail_bodystruct *body, char *prefix, int num,
int should_show, int multalt, int flags)
{
+#define NUMXLEN 512
PART *part;
- char numx[512], string[800], *description;
+ char numx[NUMXLEN], string[800], *description;
int n, named = 0, can_display_ext;
ATTACH_S *a;
@@ -279,8 +280,8 @@ describe_mime(struct mail_bodystruct *body, char *prefix, int num,
(a+1)->description = NULL;
if(body->type == TYPEMESSAGE && body->encoding <= ENCBASE64
&& body->subtype && strucmp(body->subtype, "rfc822") == 0){
- body = body->nested.msg->body;
- snprintf(numx, sizeof(numx), "%.*s%d.", sizeof(numx)-20, prefix, num);
+ body = body->nested.msg->body; /* NUMXLEN = sizeof(numx) */
+ snprintf(numx, sizeof(numx), "%.*s%d.", NUMXLEN-20, prefix, num);
numx[sizeof(numx)-1] = '\0';
describe_mime(body, numx, 1, should_show, 0, flags);
}