Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.71
 
1.72
 
MAIN:mickey:20120905151219
 
local.c
_>745745 }
 746746 
 747747 static char *
<>748 -section2string(char *name)
  748+section2string(char *name, int len)
749749 {
<>750 -        int len = strlen(name);
  750+        char *s;
  751+        int n;
751752 
 752753         if (strncmp(name, "link_set", 8) == 0) {
<>753 -                const char postfix[] = ",\"aw\",@progbits";
 754 -                char *s;
 755 -
 756 -                s = IALLOC(len + sizeof(postfix));
 757 -                strcpy(s, name);
 758 -                strcpy(s + len, postfix);
  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);
759759                 return s;
 760760         }
 761761 
     
 !
789789                 return 1;
 790790         }
 791791         if (strcmp(str, "section") == 0 && a2 != NULL) {
<>792 -                nextsect = section2string(a2);
  792+                nextsect = section2string(a2, strlen(a2));
<_793793                 return 1;
 794794         }
 795795         if (strcmp(str, "alias") == 0 && a2 != NULL) {
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-20 23:15 +0100