whitelist: Make sure listed IDs are null-terminated.
authorTobias Brunner <tobias@strongswan.org>
Fri, 18 May 2012 07:27:24 +0000 (09:27 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 18 May 2012 07:57:01 +0000 (09:57 +0200)
src/libcharon/plugins/whitelist/whitelist.c

index 5f511f2..0a3a344 100644 (file)
@@ -80,6 +80,7 @@ static int send_msg(int type, char *id)
                        {
                                break;
                        }
                        {
                                break;
                        }
+                       msg.id[sizeof(msg.id) - 1] = '\0';
                        printf("%s\n", msg.id);
                }
        }
                        printf("%s\n", msg.id);
                }
        }