diff options
author | Oneric <oneric@oneric.stub> | 2022-05-07 03:00:24 +0200 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2022-05-07 22:26:38 +0200 |
commit | df8e07544f141aae696f4dc5b4ec8f5eb2227f16 (patch) | |
tree | a3cb1817ef1e22fc3bea0a459254aadf26c4424a /profile/profile.c | |
parent | a6ae1d2fb30551570bd2fee094e1eb9e5c632afe (diff) | |
download | libass-df8e07544f141aae696f4dc5b4ec8f5eb2227f16.tar.bz2 libass-df8e07544f141aae696f4dc5b4ec8f5eb2227f16.tar.xz |
Avoid passing NULL to printf's %s if argc == 0
This is undefined behaviour even if most libcs handle it gracefully.
Diffstat (limited to 'profile/profile.c')
-rw-r--r-- | profile/profile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/profile/profile.c b/profile/profile.c index 3740a6c..28b818d 100644 --- a/profile/profile.c +++ b/profile/profile.c @@ -68,7 +68,8 @@ int main(int argc, char *argv[]) const int frame_h = 720; if (argc < 5) { - printf("usage: %s <subtitle file> <start time> <fps> <end time>\n", argv[0]); + printf("usage: %s <subtitle file> <start time> <fps> <end time>\n", + argv[0] ? argv[0] : "profile"); exit(1); } char *subfile = argv[1]; |