]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
control: Add safety check to queue data
authorRoy Marples <roy@marples.name>
Wed, 4 Sep 2019 11:11:31 +0000 (12:11 +0100)
committerRoy Marples <roy@marples.name>
Wed, 4 Sep 2019 11:11:31 +0000 (12:11 +0100)
src/control.c

index 6060e89701d32cf35d0e016cf64649c886a31997..4ae227931636eff3d663f9207db97aadc39f53ca 100644 (file)
@@ -381,6 +381,9 @@ control_queue(struct fd_list *fd, void *data, size_t data_len, bool fit)
 {
        struct fd_data *d;
 
+       if (data_len == 0)
+               return 0;
+
 #ifdef CTL_FREE_LIST
        struct fd_data *df;