Fixed undefined behavior in use of stack variable

This commit is contained in:
Thomas Egerer
2010-03-31 11:04:27 +02:00
committed by Martin Willi
parent 360ef1606f
commit a47576bff7
+1 -2
View File
@@ -266,6 +266,7 @@ starter_whack_add_pubkey (starter_conn_t *conn, starter_end_t *end
int starter_whack_add_conn(starter_conn_t *conn)
{
char esp_buf[256];
whack_message_t msg;
int r;
@@ -302,8 +303,6 @@ int starter_whack_add_conn(starter_conn_t *conn)
/* taken from pluto/whack.c */
if (msg.pfsgroup)
{
char esp_buf[256];
snprintf(esp_buf, sizeof (esp_buf), "%s;%s"
, msg.esp ? msg.esp : ""
, msg.pfsgroup ? msg.pfsgroup : "");