summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2013-09-06 17:41:24 -0300
committerJosé Roberto de Souza <jose.souza@intel.com>2013-09-06 17:41:24 -0300
commitb140380776b758d3d8c1682896787e4b5291fd5a (patch)
tree52533e0b1b6c2883a650b437090e85356acb223e
parenta8206c8b03f947b416f126b306e4422f9dc6c581 (diff)
Avoid crash when socket address lenght is bigger than 126
Here my socket address: :0.0.unix:abstract=/tmp/dbus-30Xo0YvOro,guid=c12ee38be195441e0b64c7ff5208e716.383c17da53f7fc81db94ac5f5171b40b-1376315157.910552-1882544957.=unknown=.@unknown@.!unknown!
-rw-r--r--src/bin/ipc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/ipc.c b/src/bin/ipc.c
index 75719ab..8a4f12d 100644
--- a/src/bin/ipc.c
+++ b/src/bin/ipc.c
@@ -38,7 +38,8 @@ _ipc_hash_get(void)
38{ 38{
39 char buf[1024], hash[64]; 39 char buf[1024], hash[64];
40 const char *disp, *session, *xdg_session, *xdg_id, *xdg_seat, *xdg_vt; 40 const char *disp, *session, *xdg_session, *xdg_id, *xdg_seat, *xdg_vt;
41 char *s, i; 41 char *s;
42 unsigned int i;
42 unsigned char c1, c2; 43 unsigned char c1, c2;
43 44
44 /* dumb stoopid hash - i'm feeling lazy */ 45 /* dumb stoopid hash - i'm feeling lazy */