Changeset 4fb2b3c in mod_gnutls


Ignore:
Timestamp:
Sep 14, 2008, 12:40:15 PM (11 years ago)
Author:
Nokis Mavrogiannopoulos <nmav@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
26b08fd
Parents:
5021874
git-author:
Nikos Mavrogiannopoulos <nmav@…> (09/14/08 12:40:15)
git-committer:
Nokis Mavrogiannopoulos <nmav@…> (09/14/08 12:40:15)
Message:

use memmove instead of memcpy because buffers might overlap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_io.c

    r5021874 r4fb2b3c  
    7373    if (buffer->length > inl) {
    7474        /* we have have enough to fill the caller's buffer */
    75         memcpy(in, buffer->value, inl);
     75        memmove(in, buffer->value, inl);
    7676        buffer->value += inl;
    7777        buffer->length -= inl;
     
    7979    else {
    8080        /* swallow remainder of the buffer */
    81         memcpy(in, buffer->value, buffer->length);
     81        memmove(in, buffer->value, buffer->length);
    8282        inl = buffer->length;
    8383        buffer->value = NULL;
Note: See TracChangeset for help on using the changeset viewer.