openbsd-ports/graphics/p5-Image-EXIF/patches/patch-EXIF_xs
2005-11-14 17:48:00 +00:00

17 lines
479 B
Plaintext

$OpenBSD: patch-EXIF_xs,v 1.3 2005/11/14 17:48:00 pvalchev Exp $
--- EXIF.xs.orig Wed Jan 14 15:12:54 2004
+++ EXIF.xs Mon Nov 14 10:30:18 2005
@@ -29,10 +29,10 @@ read_data(char *fname)
mode = "r";
#endif
- if(strcmp(fname, _file_name)){
+ if (strncmp(fname, _file_name, sizeof(_file_name)-1)) {
fpn = fopen(fname, mode);
if (fpn)
- strcpy(_file_name, fname);
+ strlcpy(_file_name, fname, sizeof(_file_name));
else
_file_name[0] = '\0';
} else {