author | Max Kellermann <max@duempel.org> | |
Wed, 17 Sep 2008 23:05:14 +0000 (01:05 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 17 Sep 2008 23:05:14 +0000 (01:05 +0200) | ||
commit | bf8da42199fe351c844338ac6c09d715b25d34ed | |
tree | 3d2b8ebab852207fdc6a44ec52cf22579a403b89 | tree | snapshot |
parent | 7fff0ce33c1ebf8806827b6c5fb7dfb978ff5cc3 | commit | diff |
libmpdclient: use memmove() instead of strcpy() for moving the buffer
In general, don't treat the input buffer as a null-terminated string:
don't append '\0', don't use strchr() and strtok(). To delete
consumed portions of the buffer, strcpy() is bad anyway, because it
does not allow overlapping buffers.
In general, don't treat the input buffer as a null-terminated string:
don't append '\0', don't use strchr() and strtok(). To delete
consumed portions of the buffer, strcpy() is bad anyway, because it
does not allow overlapping buffers.
src/libmpdclient.c | diff | blob | history |