mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-01-24 19:19:58 +01:00
fixed a bug causing for certain messages to rewrite the first byte to NUL-byte
This commit is contained in:
parent
5db07229f7
commit
90ef9dc0e2
@ -338,13 +338,9 @@ void fixupSoftBreakInQuotedPritableLine(char *buf, struct _state *state){
|
|||||||
char *p, puf[MAXBUFSIZE];
|
char *p, puf[MAXBUFSIZE];
|
||||||
|
|
||||||
if(strlen(state->qpbuf) > 0){
|
if(strlen(state->qpbuf) > 0){
|
||||||
memset(puf, 0, MAXBUFSIZE);
|
memset(puf, 0, sizeof(puf));
|
||||||
strncpy(puf, state->qpbuf, MAXBUFSIZE-1);
|
snprintf(puf, sizeof(puf)-1, "%s%s", state->qpbuf, buf);
|
||||||
strncat(puf, buf, MAXBUFSIZE-1);
|
snprintf(buf, MAXBUFSIZE-1, "%s", puf);
|
||||||
|
|
||||||
memset(buf, 0, MAXBUFSIZE);
|
|
||||||
memcpy(buf, puf, MAXBUFSIZE);
|
|
||||||
|
|
||||||
memset(state->qpbuf, 0, MAX_TOKEN_LEN);
|
memset(state->qpbuf, 0, MAX_TOKEN_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user