X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fsetup.c;h=261662671b4ed651f0812940012f70856ab56f4c;hb=119f5ee3d14919e18afc159074295c51e5f911ba;hp=776f30c20d3545572ee6c24cc293cb2c1393baf2;hpb=63cb2f4bcd0510c1c5052d477095c25e034a960e;p=citadel.git diff --git a/citadel/setup.c b/citadel/setup.c index 776f30c20..261662671 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -120,10 +120,10 @@ void set_init_entry(char *which_entry, char *new_state) { while(fgets(buf, sizeof buf, fp) != NULL) { if (num_tokens(buf, ':') == 4) { - extract_token(entry, buf, 0, ':'); - extract_token(levels, buf, 1, ':'); - extract_token(state, buf, 2, ':'); - extract_token(prog, buf, 3, ':'); /* includes 0x0a LF */ + extract_token(entry, buf, 0, ':', sizeof entry); + extract_token(levels, buf, 1, ':', sizeof levels); + extract_token(state, buf, 2, ':', sizeof state); + extract_token(prog, buf, 3, ':', sizeof prog); /* includes 0x0a LF */ if (!strcmp(entry, which_entry)) { strcpy(state, new_state); @@ -173,8 +173,8 @@ void locate_init_entry(char *init_entry, char *looking_for) { } else { while (fgets(buf, sizeof buf, infp) != NULL) { buf[strlen(buf) - 1] = 0; - extract_token(entry, buf, 0, ':'); - extract_token(prog, buf, 3, ':'); + extract_token(entry, buf, 0, ':', sizeof entry); + extract_token(prog, buf, 3, ':', sizeof prog); if (!strncasecmp(prog, looking_for, strlen(looking_for))) { ++have_entry; @@ -278,7 +278,7 @@ int yesno(char *question) newtCenteredWindow(76, prompt_window_height, "Question"); form = newtForm(NULL, NULL, 0); for (i=0; i