From: Jonatan Schlag Date: Sun, 22 Sep 2024 15:18:18 +0000 (+0200) Subject: setup: Copy the description of a mac without "" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fadd_network_zone_functions;p=people%2Fjschlag%2Fipfire-2.x.git setup: Copy the description of a mac without "" This creates problems as the "" are invalid characters which our new bash readhash refuses to accepts. Signed-off-by: Jonatan Schlag --- diff --git a/src/setup/netstuff.c b/src/setup/netstuff.c index ec4c31513..5967a7882 100644 --- a/src/setup/netstuff.c +++ b/src/setup/netstuff.c @@ -606,7 +606,7 @@ int scan_network_cards(void) sprintf(nics[count].driver, "%s", temp_line+strlen(_driver)); } if ( strncmp(temp_line, _desc, strlen(_desc)) == 0 ) { - sprintf(nics[count].description, "%s", temp_line+strlen(_desc)); + snprintf(nics[count].description, strlen(temp_line) - strlen(_desc) - 1,"%s", temp_line+strlen(_desc)+1 ); } if ( strncmp(temp_line, _network_hwaddr, strlen(_network_hwaddr)) == 0 ) { sprintf(nics[count].macaddr, "%s", temp_line+strlen(_network_hwaddr));