file/file-5.17-option.dif
Dr. Werner Fink 6292248367 Accepting request 815549 from home:polslinux:branches:Base:System
- Update to 5.39 
  * Remove unused subtype_mime (Steve Grubb)
  * Remove unused check in okstat (Steve Grubb)
  * Fix mime-type in elf binaries by making sure $x is set
  * Fix indirect negative offsets broken by OFFNEGATIVE
  * Fix GUID equality check
  * PR/165: Handle empty array and strings in JSON
  * PR/162: Add --exclude-quiet
  * Various fixes
  * add guid support
- Removed undo-24c9c0.patch as it is now part of upstream
- Updated file-5.17-option.dif

OBS-URL: https://build.opensuse.org/request/show/815549
OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=214
2020-06-17 15:16:08 +00:00

39 lines
853 B
Plaintext

--- file-5.39/src/file.c.orig 2020-06-17 16:13:36.625305367 +0200
+++ file-5.39/src/file.c 2020-06-17 16:15:12.429553163 +0200
@@ -249,6 +249,8 @@
break;
case 'e':
case OPT_EXCLUDE_QUIET:
+ if (!optarg)
+ usage();
for (i = 0; i < __arraycount(nv); i++)
if (strcmp(nv[i].name, optarg) == 0)
break;
@@ -261,7 +263,7 @@
break;
case 'f':
- if(action)
+ if(action || !optarg)
usage();
if (magic == NULL)
if ((magic = load(magicfile, flags)) == NULL)
@@ -271,6 +273,8 @@
++didsomefiles;
break;
case 'F':
+ if(!optarg)
+ usage();
separator = optarg;
break;
case 'i':
@@ -283,6 +287,8 @@
action = FILE_LIST;
break;
case 'm':
+ if(!optarg)
+ usage();
magicfile = optarg;
break;
case 'n':