ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.126 by ayin, Wed Dec 26 14:22:30 2007 UTC vs.
Revision 1.127 by ayin, Mon Jan 7 12:41:31 2008 UTC

631 631
632 if (slashes >= 13 && (!old || *field == old)) 632 if (slashes >= 13 && (!old || *field == old))
633 { 633 {
634 size_t len = field - name; 634 size_t len = field - name;
635 *ptr = (char *)malloc (len + strlen (replace) + strlen (end) + 1); 635 *ptr = (char *)malloc (len + strlen (replace) + strlen (end) + 1);
636 strncpy (*ptr, name, len); 636 memcpy (*ptr, name, len);
637 strcpy (*ptr + len, replace); 637 strcpy (*ptr + len, replace);
638 strcat (*ptr, end); 638 strcat (*ptr, end);
639 639
640 return true; 640 return true;
641 } 641 }
1532 if (!end) 1532 if (!end)
1533 end = desc + strlen (desc); 1533 end = desc + strlen (desc);
1534 1534
1535 if (end - desc < 511) 1535 if (end - desc < 511)
1536 { 1536 {
1537 strncpy (buf, desc, end - desc); 1537 memcpy (buf, desc, end - desc);
1538 buf[end - desc] = 0; 1538 buf[end - desc] = 0;
1539 1539
1540 fonts.push_back (new_font (buf, cs)); 1540 fonts.push_back (new_font (buf, cs));
1541 } 1541 }
1542 else 1542 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines