tags 753516 + patch upstream
thanks

The problem is caused by a use of strcpy for overlapping regions.
Patch attached, uploading NMU to the DELAYED queue.
Description: Use memmove instead of memcpy for overlapping src/dst
Author: Yann Dirson <ydirson@free;fr>
Bug-Debian: http://bugs.debian.org/753516

--- xscorch-0.2.1.orig/libj/jstr/str_trim.c
+++ xscorch-0.2.1/libj/jstr/str_trim.c
@@ -47,7 +47,7 @@ char *trim(char *s) {
       SET_LAST_NWS(ws, s);
 
       /* Copy the non-ws characters in <s>. */
-      if(ws.fnws > d) MEMCPY(d, ws.fnws, NWS_SIZE(ws));
+      if(ws.fnws > d) MEMMOVE(d, ws.fnws, NWS_SIZE(ws));
       *(d + NWS_SIZE(ws)) = '\0';
       return(d);
 
@@ -93,7 +93,7 @@ char *ltrim(char *s) {
 
    if(s != NULL) {
       SKIM_WHITESPACE(s);
-      MEMCPY(d, s, STRLEN(s) + 1);
+      MEMMOVE(d, s, STRLEN(s) + 1);
       return(d);
    }
    return(NULL);

Reply via email to