aboutsummaryrefslogtreecommitdiffstats
path: root/www/aria/files/patch-src::GtrlSocket.cc
blob: 6654d10171492a703fdd78d2e102a8b33caa12bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- src/CtrlSocket.cc.orig  2002-10-01 17:32:00.000000000 +0200
+++ src/CtrlSocket.cc   2004-01-10 02:13:30.000000000 +0100
@@ -183,7 +183,7 @@
     stored_uid = getuid();
     euid = geteuid();
     setuid(euid);
-    sprintf(saddr.sun_path, "%s/aria_%s.%d", g_get_tmp_dir(), g_get_user_name(), session);
+    snprintf(saddr.sun_path, sizeof(saddr.sun_path)-1, "%s/aria_%s.%d", g_get_tmp_dir(), g_get_user_name(), session);
     setreuid(stored_uid, euid);
     if (connect(fd, (struct sockaddr *) &saddr, sizeof (saddr)) != -1)
       return fd;