this assigns negative values into char's all over the place, quick fix

is to specifically get signed char although most of those look wrong
and the code should be rewritten majorly.  maintainer gave me the
blessing for this not long ago; more issues remain
This commit is contained in:
pvalchev 2002-12-28 22:55:46 +00:00
parent 8557012a72
commit 826e4a2989

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_ec_decodedata_c,v 1.1 2002/12/28 22:55:46 pvalchev Exp $
--- src/ec_decodedata.c.orig Thu Dec 12 00:29:18 2002
+++ src/ec_decodedata.c Thu Dec 12 00:29:50 2002
@@ -309,7 +309,7 @@ void Decodedata_UpdateInfo(CONNECTION *p
ptr->user[sizeof(ptr->user)-1] = '\0';
if (strchr(data->user, '\n')) // the string is ultimated
{
- char str[sizeof(ptr->user)];
+ signed char str[sizeof(ptr->user)];
ptr->user[0] = ' ';
strtok(ptr->user, "\n");
@@ -330,7 +330,7 @@ void Decodedata_UpdateInfo(CONNECTION *p
ptr->pass[sizeof(ptr->pass) -1] = '\0';
if (strchr(data->pass, '\n')) // the string is ultimated
{
- char str[sizeof(ptr->pass)];
+ signed char str[sizeof(ptr->pass)];
ptr->pass[0] = ' ';
strtok(ptr->pass, "\n");