• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révision42354845ae5e00ec1c3519e1f2166b79a9533401 (tree)
l'heure2017-04-23 20:03:35
AuteurAlan Modra <amodra@gmai...>
CommiterAlan Modra

Message de Log

PR 21418, ar -N lacks arg check

PR 21418
* ar.c (main): Check -a, -b, -i and -N args are given.

Change Summary

Modification

--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,10 @@
11 2017-04-23 Alan Modra <amodra@gmail.com>
22
3+ PR 21418
4+ * ar.c (main): Check -a, -b, -i and -N args are given.
5+
6+2017-04-23 Alan Modra <amodra@gmail.com>
7+
38 PR 21417
49 * ar.c (main): Check that an archive file is given after options.
510
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -776,12 +776,18 @@ main (int argc, char **argv)
776776 default_deterministic ();
777777
778778 if (postype != pos_default)
779- posname = argv[arg_index++];
779+ {
780+ posname = argv[arg_index++];
781+ if (posname == NULL)
782+ fatal (_("missing position arg."));
783+ }
780784
781785 if (counted_name_mode)
782786 {
783787 if (operation != extract && operation != del)
784788 fatal (_("`N' is only meaningful with the `x' and `d' options."));
789+ if (argv[arg_index] == NULL)
790+ fatal (_("`N' missing value."));
785791 counted_name_counter = atoi (argv[arg_index++]);
786792 if (counted_name_counter <= 0)
787793 fatal (_("Value for `N' must be positive."));