chiark / gitweb /
util: don't accept an empty peer label as valid
authorLennart Poettering <lennart@poettering.net>
Tue, 24 Dec 2013 15:21:59 +0000 (16:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 24 Dec 2013 15:21:59 +0000 (16:21 +0100)
src/shared/util.c

index 6b6722c..f491708 100644 (file)
@@ -6172,6 +6172,11 @@ int getpeersec(int fd, char **ret) {
                 }
         }
 
+        if (isempty(s)) {
+                free(s);
+                return -ENOTSUP;
+        }
+
         *ret = s;
         return 0;
 }