ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/modules/aim-toc/libtoc libtoc.c,1.16,1.17


From: Edward L. Haletky <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/aim-toc/libtoc libtoc.c,1.16,1.17
Date: Fri, 28 Mar 2003 10:09:02 -0500

Update of /cvsroot/ayttm/ayttm/modules/aim-toc/libtoc
In directory subversions:/tmp/cvs-serv10210/modules/aim-toc/libtoc

Modified Files:
        libtoc.c 
Log Message:


Fixed buffer size and value issues in permit/deny


Index: libtoc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/aim-toc/libtoc/libtoc.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- libtoc.c    27 Mar 2003 20:00:45 -0000      1.16
+++ libtoc.c    28 Mar 2003 15:09:00 -0000      1.17
@@ -663,11 +663,15 @@
 
 void toc_accept_user(toc_conn *conn, char *user)
 {
-       char buff2[1024];
-       g_snprintf(buff2, 2048, "toc2_add_permit %s", aim_normalize(user));
-       send_flap(conn, DATA, buff2);
-       g_snprintf(buff2, 2048, "toc2_remove_deny %s", aim_normalize(user));
-       send_flap(conn, DATA, buff2);
+       char buff2[2048];
+       if (user) { /* Only if User is not NULL */
+               g_snprintf(buff2, 2048, "toc2_add_permit %s", 
+                       aim_normalize(user));
+               send_flap(conn, DATA, buff2);
+               g_snprintf(buff2, 2048, "toc2_remove_deny %s", 
+                       aim_normalize(user));
+               send_flap(conn, DATA, buff2);
+       }
 }
 
 char * get_flap(toc_conn * conn )





reply via email to

[Prev in Thread] Current Thread [Next in Thread]