summaryrefslogtreecommitdiff
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2022-08-28 17:46:08 +0200
committerMark Wielaard <mark@klomp.org>2022-09-14 20:48:29 +0200
commit6cb01b4ef3cdd4f83d21bbcec72fa66712ac14e6 (patch)
tree5e37ea849e6d667903ff56623f5bc4ea0b8925b5 /src/ChangeLog
parentee188125b10d1588a0536af033d7b7b1bbbaafaf (diff)
downloadelfutils-6cb01b4ef3cdd4f83d21bbcec72fa66712ac14e6.tar.gz
ar: Correct -N COUNT off-by-one
When using instance [COUNT], the instance check is wrong. instance-- == 0 should be --instance == 0. Add a testcase run-ar-N.sh that uses -N COUNT with extract and delete operations checking the right instance was extracted and deleted. https://sourceware.org/bugzilla/show_bug.cgi?id=28725 Reported-by: panxiaohe <panxh_ran@163.com> Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 88db4051..9348c562 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2022-08-28 Mark Wielaard <mark@klomp.org>
+
+ * ar.c (do_oper_extract): Predecrement instance before compare
+ to zero.
+ (do_oper_delete): Likewise.
+
2022-08-10 Andreas Schwab <schwab@suse.de>
* readelf.c (print_attributes): Also handle SHT_RISCV_ATTRIBUTES.