2009-05-04 19:24:09 -04:00
|
|
|
$OpenBSD: patch-pictures_c,v 1.4 2009/05/04 23:24:09 pirofti Exp $
|
|
|
|
--- pictures.c.orig Sun Apr 19 13:40:53 2009
|
|
|
|
+++ pictures.c Sun Apr 19 13:41:52 2009
|
2007-07-18 05:58:22 -04:00
|
|
|
@@ -223,7 +223,7 @@ parse_slideshow(const char *slideshowtext, double flas
|
2009-05-04 19:24:09 -04:00
|
|
|
int i, clock_xoff = -1;
|
|
|
|
|
2001-04-04 16:29:30 -04:00
|
|
|
if (strlen(slideshowtext) >= BUFSIZ) return 0;
|
|
|
|
- strcpy(buf, slideshowtext);
|
|
|
|
+ strlcpy(buf, slideshowtext, sizeof(buf));
|
|
|
|
s = buf;
|
2009-05-04 19:24:09 -04:00
|
|
|
|
2001-04-04 16:29:30 -04:00
|
|
|
gfs = Gif_NewStream();
|
2007-07-18 05:58:22 -04:00
|
|
|
@@ -243,9 +243,9 @@ parse_slideshow(const char *slideshowtext, double flas
|
2009-05-04 19:24:09 -04:00
|
|
|
|
2007-07-18 05:58:22 -04:00
|
|
|
if (n[0] == '&' || n[0] == '*') {
|
2001-04-04 16:29:30 -04:00
|
|
|
/* built-in image */
|
|
|
|
- strcpy(name, n + 1);
|
|
|
|
+ strlcpy(name, n + 1, sizeof(name));
|
2007-07-18 05:58:22 -04:00
|
|
|
if (mono)
|
|
|
|
- strcat(name, "mono");
|
2009-05-04 19:24:09 -04:00
|
|
|
+ strlcat(name, "mono", sizeof(name));
|
2001-04-04 16:29:30 -04:00
|
|
|
i = strlen(name);
|
|
|
|
add = get_built_in_image(name);
|
|
|
|
/* some images don't have monochromatic versions; fall back on color */
|