kov changed libgksu/trunk/libgksu/gksu-context.c
Gustavo Noronha
kov at costa.debian.org
Sun Apr 16 16:02:30 UTC 2006
Mensagem de log:
more debug code not buffer overflowing with suggestion
of Beno?\195?\174t Dejean <benoit at placenet.org>
-----
Modified: libgksu/trunk/libgksu/gksu-context.c
===================================================================
--- libgksu/trunk/libgksu/gksu-context.c 2006-04-16 15:51:37 UTC (rev 543)
+++ libgksu/trunk/libgksu/gksu-context.c 2006-04-16 16:02:29 UTC (rev 544)
@@ -538,7 +538,7 @@
int in, out;
int r;
char *newfn;
- char buf[BUFSIZ];
+ char buf[BUFSIZ] = "";
newfn = g_strdup_printf("%s/.Xauthority", dir);
@@ -692,7 +692,7 @@
struct timeval tv;
struct termios tio;
- gchar buf[256];
+ gchar buf[256] = {0};
gint status;
FD_ZERO(&rfds);
@@ -704,7 +704,7 @@
if (select (fdpty+1, &rfds, NULL, NULL, &tv) < 0)
return TRUE;
- read (fdpty, buf, 256);
+ read (fdpty, buf, 255);
if (context->debug)
fprintf (stderr, "try_su_run: buf: -%s-\n", buf);
@@ -875,7 +875,7 @@
struct termios tio;
usleep (100);
- read (fdpty, buf, 256);
+ read (fdpty, buf, 255);
if (context->debug)
fprintf (stderr, "gksu_context_run: buf: -%s-\n", buf);
More information about the gksu-commits
mailing list