Fix long passwords in unrar oi_151a
authorJon Tibble <meths@btinternet.com>
Mon, 26 Aug 2013 23:00:28 +0100
branchoi_151a
changeset 237 236d36d9ba7b
parent 236 acdb4275223d
child 238 7056ed228625
Fix long passwords in unrar
usr/src/cmd/unrar/Patches/02.getpass.patch
--- a/usr/src/cmd/unrar/Patches/02.getpass.patch	Sat Aug 24 18:54:34 2013 +0100
+++ b/usr/src/cmd/unrar/Patches/02.getpass.patch	Mon Aug 26 23:00:28 2013 +0100
@@ -1,11 +1,14 @@
---- consio.cpp.orig	2012-04-17 08:23:59.905765212 -0700
-+++ consio.cpp	2012-04-17 08:25:47.074246361 -0700
-@@ -141,7 +141,7 @@
+--- consio.cpp.orig	2013-08-26 22:57:02.118259745 +0100
++++ consio.cpp	2013-08-26 22:58:00.611603308 +0100
+@@ -141,8 +141,10 @@
    SetConsoleMode(hConOut,ConOutMode);
  #else
    char StrA[MAXPASSWORD];
 -#if defined(_EMX) || defined(_BEOS) || defined(__sparc) || defined(sparc) || defined (__VMS)
 +#if defined(_EMX) || defined(_BEOS) || defined (__VMS)
    fgets(StrA,ASIZE(StrA)-1,stdin);
++#elif defined(__sun)
++  strncpyz(StrA,getpassphrase(""),ASIZE(StrA));
  #else
    strncpyz(StrA,getpass(""),ASIZE(StrA));
+ #endif