summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2007-05-01 17:01:40 +0000
committerPeter Volkov <pva@gentoo.org>2007-05-01 17:01:40 +0000
commitec9954df8f9dcaf9bf0991ae5abae1cbbe6a7f18 (patch)
tree45869be2490244044e98f90a0cda8bb47f5b2e07 /app-text/dos2unix/files
parentVersion bumped. (diff)
downloadhistorical-ec9954df8f9dcaf9bf0991ae5abae1cbbe6a7f18.tar.gz
historical-ec9954df8f9dcaf9bf0991ae5abae1cbbe6a7f18.tar.bz2
historical-ec9954df8f9dcaf9bf0991ae5abae1cbbe6a7f18.zip
Fixed bug #174776. Thank Toralf Förster for report.
Package-Manager: portage-2.1.2.2
Diffstat (limited to 'app-text/dos2unix/files')
-rw-r--r--app-text/dos2unix/files/digest-dos2unix-3.1-r2 (renamed from app-text/dos2unix/files/digest-dos2unix-3.1)0
-rw-r--r--app-text/dos2unix/files/dos2unix-3.1-workaround-rename-EXDEV.patch56
2 files changed, 56 insertions, 0 deletions
diff --git a/app-text/dos2unix/files/digest-dos2unix-3.1 b/app-text/dos2unix/files/digest-dos2unix-3.1-r2
index a0cd4541c73e..a0cd4541c73e 100644
--- a/app-text/dos2unix/files/digest-dos2unix-3.1
+++ b/app-text/dos2unix/files/digest-dos2unix-3.1-r2
diff --git a/app-text/dos2unix/files/dos2unix-3.1-workaround-rename-EXDEV.patch b/app-text/dos2unix/files/dos2unix-3.1-workaround-rename-EXDEV.patch
new file mode 100644
index 000000000000..71a3a697e5dd
--- /dev/null
+++ b/app-text/dos2unix/files/dos2unix-3.1-workaround-rename-EXDEV.patch
@@ -0,0 +1,56 @@
+--- ./dos2unix.c.orig 2007-04-17 11:16:32.000000000 +0400
++++ ./dos2unix.c 2007-04-17 12:41:01.000000000 +0400
+@@ -279,7 +279,7 @@
+ int RetVal = 0;
+ FILE *InF = NULL;
+ FILE *TempF = NULL;
+- char TempPath[16];
++ char *TempPath = (char *) malloc(sizeof(char) * strlen(ipInFN)+14);
+ struct stat StatBuf;
+ struct utimbuf UTimeBuf;
+ int fd;
+@@ -288,7 +288,8 @@
+ if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf))
+ RetVal = -1;
+
+- strcpy (TempPath, "./d2utmpXXXXXX");
++ strcpy (TempPath, ipInFN);
++ strcat (TempPath, "_u2dtmpXXXXXX");
+ if((fd=mkstemp (TempPath))<0) {
+ perror("Failed to open output temp file");
+ RetVal = -1;
+@@ -349,6 +350,7 @@
+ RetVal = -1;
+ }
+ }
++ free (TempPath);
+ return RetVal;
+ }
+
+@@ -364,7 +366,7 @@
+ int RetVal = 0;
+ FILE *InF = NULL;
+ FILE *TempF = NULL;
+- char TempPath[16];
++ char *TempPath = (char *) malloc(sizeof(char) * strlen(ipInFN)+14);
+ struct stat StatBuf;
+ struct utimbuf UTimeBuf;
+ mode_t mode = S_IRUSR | S_IWUSR;
+@@ -376,7 +378,8 @@
+ else
+ mode = StatBuf.st_mode;
+
+- strcpy (TempPath, "./u2dtmpXXXXXX");
++ strcpy (TempPath, ipInFN);
++ strcat (TempPath, "_u2dtmpXXXXXX");
+ if((fd=mkstemp (TempPath))<0) {
+ perror("Failed to open output temp file");
+ RetVal = -1;
+@@ -442,6 +445,7 @@
+ }
+ RetVal = -1;
+ }
++ free (TempPath);
+ return RetVal;
+ }
+