[Bug 2044264] Re: [SRU] mmv aborts with realloc(): invalid pointer
Dave Jones
2044264 at bugs.launchpad.net
Mon Jan 22 13:21:18 UTC 2024
Confirmed issue on mantic only, and I agree the gnulib fix is overly
complex for a mantic SRU. The proposed fix looks minimal and reasonable
(and is nicely in keeping with the rest of the unit, using the ckd_
function for mul). Sponsoring for mantic (with minor change for
maintainer address in d/control now there's an ubuntu component in the
version).
--
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2044264
Title:
[SRU] mmv aborts with realloc(): invalid pointer
Status in mmv package in Ubuntu:
Fix Released
Status in mmv source package in Mantic:
Confirmed
Status in mmv package in Debian:
Fix Released
Bug description:
[ Impact ]
mmv is completely unusable if the user tries to use mmv with more than
9 files. It will result in a coredump as it will try to use an invalid
pointer.
[ Test Plan ]
The following commands will use mmv to rename files.
* mkdir -p test
* cd test
* touch `seq 1 10`
* mmv '*' '#1.o'
If the package is not fixed then the above commands will result in a
coredump with the error:
realloc(): invalid pointer
Aborted (core dumped)
With the fixed package the above command will rename the files with .o
extension.
[ Where problems could occur ]
The latest version of gnulib is using realloc() after the multiplication overflow check which has been backported here, so there should not be any regression here.
The realloc part of the code will only be used if the number of files is more than 9 and mmv is already unusable in that scenario.
[ Other Info ]
* upstream has already reverted the change and is using an older version of gnulib, so the next mmv versions are not affected.
* The patch has not been sent upsteam as the gnulib code is correct, the problem was in the way mmv upstream has configured gnulib.
[ Original Bug Description ]
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042020
Can you please import the fix?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mmv/+bug/2044264/+subscriptions
More information about the Ubuntu-sponsors
mailing list