[Bug 2044264] [NEW] [SRU] mmv aborts with realloc(): invalid pointer
Launchpad Bug Tracker
2044264 at bugs.launchpad.net
Fri Jan 19 23:03:10 UTC 2024
You have been subscribed to a public bug by Sudip Mukherjee (sudipmuk):
[ 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?
** Affects: mmv (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: mmv (Ubuntu Mantic)
Importance: Undecided
Status: Confirmed
** Affects: mmv (Debian)
Importance: Unknown
Status: Fix Released
** Tags: mantic
--
[SRU] mmv aborts with realloc(): invalid pointer
https://bugs.launchpad.net/bugs/2044264
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.
More information about the Ubuntu-sponsors
mailing list