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.125 by ayin, Sun Nov 25 11:23:18 2007 UTC vs.
Revision 1.127 by ayin, Mon Jan 7 12:41:31 2008 UTC

19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 *---------------------------------------------------------------------*/ 20 *---------------------------------------------------------------------*/
21 21
22#include "../config.h" 22#include "../config.h"
23#include "rxvt.h" 23#include "rxvt.h"
24#include "rxvtlib.h"
25#include "rxvtutil.h" 24#include "rxvtutil.h"
26#include "rxvtfont.h" 25#include "rxvtfont.h"
27 26
28#include <cstdlib> 27#include <cstdlib>
29 28
632 631
633 if (slashes >= 13 && (!old || *field == old)) 632 if (slashes >= 13 && (!old || *field == old))
634 { 633 {
635 size_t len = field - name; 634 size_t len = field - name;
636 *ptr = (char *)malloc (len + strlen (replace) + strlen (end) + 1); 635 *ptr = (char *)malloc (len + strlen (replace) + strlen (end) + 1);
637 strncpy (*ptr, name, len); 636 memcpy (*ptr, name, len);
638 strcpy (*ptr + len, replace); 637 strcpy (*ptr + len, replace);
639 strcat (*ptr, end); 638 strcat (*ptr, end);
640 639
641 return true; 640 return true;
642 } 641 }
1533 if (!end) 1532 if (!end)
1534 end = desc + strlen (desc); 1533 end = desc + strlen (desc);
1535 1534
1536 if (end - desc < 511) 1535 if (end - desc < 511)
1537 { 1536 {
1538 strncpy (buf, desc, end - desc); 1537 memcpy (buf, desc, end - desc);
1539 buf[end - desc] = 0; 1538 buf[end - desc] = 0;
1540 1539
1541 fonts.push_back (new_font (buf, cs)); 1540 fonts.push_back (new_font (buf, cs));
1542 } 1541 }
1543 else 1542 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines