Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37549221
en ru br
Репозитории ALT
S:3.93.0-alt1
5.1: 3.12.9.0-alt1.M50P.1
4.1: 3.12.1-alt0.20080628.M41.2
4.0: 3.11.4-alt1
www.altlinux.org/Changes

Группа :: Система/Библиотеки
Пакет: nss

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: nsspem-642433.patch
Скачать


diff -up ./mozilla/security/nss/lib/ckfw/pem/util.c.642433 ./mozilla/security/nss/lib/ckfw/pem/util.c
--- ./mozilla/security/nss/lib/ckfw/pem/util.c.642433	2010-11-25 10:49:27.000000000 -0800
+++ ./mozilla/security/nss/lib/ckfw/pem/util.c	2010-12-08 08:02:02.618304926 -0800
@@ -96,9 +96,6 @@ static SECItem *AllocItem(SECItem * item
     return (result);
 
   loser:
-    if (result != NULL) {
-	SECITEM_FreeItem(result, (item == NULL) ? PR_TRUE : PR_FALSE);
-    }
     return (NULL);
 }
 
@@ -110,7 +107,7 @@ static SECStatus FileToItem(SECItem * ds
 
     prStatus = PR_GetOpenFileInfo(src, &info);
 
-    if (prStatus != PR_SUCCESS) {
+    if (prStatus != PR_SUCCESS || info.type == PR_FILE_DIRECTORY) {
 	return SECFailure;
     }
 
@@ -126,8 +123,7 @@ static SECStatus FileToItem(SECItem * ds
 
     return SECSuccess;
   loser:
-    SECITEM_FreeItem(dst, PR_FALSE);
-    nss_ZFreeIf(dst);
+    nss_ZFreeIf(dst->data);
     return SECFailure;
 }
 
@@ -153,6 +149,10 @@ ReadDERFromFile(SECItem *** derlist, cha
 
 	/* Read in ascii data */
 	rv = FileToItem(&filedata, inFile);
+	if (rv != SECSuccess) {
+	    PR_Close(inFile);
+	    return -1;
+	}
 	asc = (char *) filedata.data;
 	if (!asc) {
 	    PR_Close(inFile);
@@ -252,7 +252,7 @@ ReadDERFromFile(SECItem *** derlist, cha
     } else {
 	/* Read in binary der */
 	rv = FileToItem(der, inFile);
-	if (rv) {
+	if (rv != SECSuccess) {
 	    PR_Close(inFile);
 	    return -1;
 	}
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin