* mailbox/mapfile_stream.c (_mapfile_write): Make sure
the size is not zero before making the memcpy().
Showing
2 changed files
with
20 additions
and
0 deletions
1 | 2001-07-04 Alain Magloire | ||
2 | |||
3 | * mailbox2/stream.c: stream_read() and stream_write() | ||
4 | change prototype to be "void *" instead of "char *". | ||
5 | * mailbox2/bstream.c: Adjust bstream_{read,write} to the | ||
6 | new prototypes. | ||
7 | * mailbox2/pop3/pop3_stream.c: Likewised. | ||
8 | * mailbox2/Makefile.am: New file. | ||
9 | * mailbox2/pop3/Makefile.am: New file. | ||
10 | * mailbox2/mstream.c: Mapfile stream Implementation. | ||
11 | * mailbox2/fstream.c: File stream implementation. | ||
12 | * mailbox2/include/mailutils/sys/fstream.h: New file. | ||
13 | * mailbox2/include/mailutils/sys/mstream.h: New file. | ||
14 | * mailbox2/tcp.c: rename to tcpstream.c. | ||
15 | * mailbox2/include/mailutils/sys/tcp.h: Rename to tcpstream.h | ||
16 | |||
17 | * mailbox/mapfile_stream.c (_mapfile_write): Make sure | ||
18 | the size is not zero before making the memcpy(). | ||
19 | |||
1 | 2001-07-03 Alain Magloire | 20 | 2001-07-03 Alain Magloire |
2 | 21 | ||
3 | * mail/headers.c: Catch the overflow in the calculation by | 22 | * mail/headers.c: Catch the overflow in the calculation by | ... | ... |
... | @@ -142,6 +142,7 @@ _mapfile_write (stream_t stream, const char *iptr, size_t isize, | ... | @@ -142,6 +142,7 @@ _mapfile_write (stream_t stream, const char *iptr, size_t isize, |
142 | mfs->size = offset + isize; | 142 | mfs->size = offset + isize; |
143 | } | 143 | } |
144 | 144 | ||
145 | if (isize) | ||
145 | memcpy (mfs->ptr + offset, iptr, isize); | 146 | memcpy (mfs->ptr + offset, iptr, isize); |
146 | if (nbytes) | 147 | if (nbytes) |
147 | *nbytes = isize; | 148 | *nbytes = isize; | ... | ... |
-
Please register or sign in to post a comment