Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.72
 
1.73
 
MAIN:plunky:20120906113232
 
local.c
_>745745 }
 746746 
 747747 static char *
<>748 -section2string(char *name, int len)
  748+section2string(char *name)
749749 {
<>750 -        char *s;
 751 -        int n;
  750+        int len = strlen(name);
752751 
 753752         if (strncmp(name, "link_set", 8) == 0) {
<>754 -                const char *postfix = ",\"aw\",@progbits";
 755 -                n = len + strlen(postfix) + 1;
 756 -                s = IALLOC(n);
 757 -                strlcpy(s, name, n);
 758 -                strlcat(s, postfix, n);
  753+                const char postfix[] = ",\"aw\",@progbits";
  754+                char *s;
  755+
  756+                s = IALLOC(len + sizeof(postfix));
  757+                memcpy(s, name, len);
  758+                memcpy(s + len, postfix, sizeof(postfix));
759759                 return s;
 760760         }
 761761 
     
 !
789789                 return 1;
 790790         }
 791791         if (strcmp(str, "section") == 0 && a2 != NULL) {
<>792 -                nextsect = section2string(a2, strlen(a2));
  792+                nextsect = section2string(a2);
<_793793                 return 1;
 794794         }
 795795         if (strcmp(str, "alias") == 0 && a2 != NULL) {
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-28 03:02 +0200