aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-08-29 16:58:05 -0500
committerTed Gould <ted@gould.cx>2012-08-29 16:58:05 -0500
commite2d8b821e5047519f673462b6301e8d19ad170ce (patch)
tree68008a85702e841141662d78ae3d51a44c38179f
parent2cbe73dc61092017ed5b09dd4d3c866cde74db07 (diff)
downloadlightdm-remote-session-arctica-e2d8b821e5047519f673462b6301e8d19ad170ce.tar.gz
lightdm-remote-session-arctica-e2d8b821e5047519f673462b6301e8d19ad170ce.tar.bz2
lightdm-remote-session-arctica-e2d8b821e5047519f673462b6301e8d19ad170ce.zip
Check to ensure we wrote something
-rw-r--r--socket-sucker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/socket-sucker.c b/socket-sucker.c
index 54aee32..35424a6 100644
--- a/socket-sucker.c
+++ b/socket-sucker.c
@@ -43,7 +43,7 @@ main (int argc, char * argv[])
serv_addr.sun_family = AF_UNIX;
int printsize = snprintf(serv_addr.sun_path, sizeof(serv_addr.sun_path) - 1, "%s/%s", home, ".freerdp-socket");
- if (printsize > sizeof(serv_addr.sun_path) - 1) {
+ if (printsize > sizeof(serv_addr.sun_path) - 1 || printsize < 0) {
return -1;
}