Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit555fb1d

Browse files
committed
add check that string options are not provided with empty strings
1 parente291e53 commit555fb1d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎utils/pgut.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,10 @@ assign_option(pgut_option *opt, const char *optarg, pgut_optsrc src)
241241
if (orig_source!=SOURCE_DEFAULT)
242242
free(*(char**)opt->var);
243243
*(char**)opt->var=pgut_strdup(optarg);
244-
return;
244+
if (strcmp(optarg,"")!=0)
245+
return;
246+
message="a valid string. But provided: ";
247+
break;
245248
case't':
246249
if (parse_time(optarg,opt->var))
247250
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp