aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}