re-introduce old nss im too tired for this

This commit is contained in:
wuggy 2026-06-30 06:37:32 +01:00
commit 3a838106b9
2871 changed files with 1374431 additions and 1762417 deletions

View file

@ -17,7 +17,6 @@
#include "basicutil.h"
#include <stdarg.h>
#include <stddef.h>
#include <sys/stat.h>
#include <errno.h>
@ -633,8 +632,7 @@ void
SECU_PrintPRandOSError(const char *progName)
{
char buffer[513];
PRInt32 errLenInt = PR_GetErrorTextLength();
size_t errLen = errLenInt < 0 ? 0 : (size_t)errLenInt;
PRInt32 errLen = PR_GetErrorTextLength();
if (errLen > 0 && errLen < sizeof buffer) {
PR_GetErrorText(buffer);
}
@ -679,8 +677,9 @@ SECU_SECItemToHex(const SECItem *item, char *dst)
unsigned char *src = item->data;
unsigned int len = item->len;
for (; len > 0; --len, dst += 2) {
snprintf(dst, 3, "%02x", *src++);
sprintf(dst, "%02x", *src++);
}
*dst = '\0';
}
}
@ -740,6 +739,7 @@ SECU_HexString2SECItem(PLArenaPool *arena, SECItem *item, const char *str)
int byteval = 0;
int tmp = PORT_Strlen(str);
PORT_Assert(arena);
PORT_Assert(item);
if ((tmp % 2) != 0) {
@ -760,9 +760,7 @@ SECU_HexString2SECItem(PLArenaPool *arena, SECItem *item, const char *str)
} else if ((str[i] >= 'A') && (str[i] <= 'F')) {
tmp = str[i] - 'A' + 10;
} else {
if (!arena) {
SECITEM_FreeItem(item, PR_FALSE);
}
/* item is in arena and gets freed by the caller */
return NULL;
}