Pad callsign with nuls
authorKeith Packard <keithp@keithp.com>
Sat, 9 May 2009 17:23:49 +0000 (10:23 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 9 May 2009 17:23:49 +0000 (10:23 -0700)
ao_config.c

index 9bb8fd1ae16f230384758c051a506811c83abd74..02f1e0827774d2f79da5c318eb37b814fba0fbb5 100644 (file)
@@ -87,6 +87,8 @@ ao_config_callsign_set(void) __reentrant
                return;
        ao_mutex_get(&ao_config_mutex);
        _ao_config_get();
+       while (c < AO_MAX_CALLSIGN + 1)
+               callsign[c++] = '\0';
        memcpy(&ao_config.callsign, &callsign,
               AO_MAX_CALLSIGN + 1);
        ao_config_dirty = 1;