[SRU] mmv aborts with realloc(): invalid pointer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mmv (Debian) |
Fix Released
|
Unknown
|
|||
mmv (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Mantic |
Fix Released
|
Undecided
|
Unassigned |
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:/
Can you please import the fix?
Changed in mmv (Ubuntu): | |
status: | New → Fix Released |
Changed in mmv (Ubuntu Mantic): | |
status: | New → In Progress |
assignee: | nobody → Sudip Mukherjee (sudipmuk) |
Changed in mmv (Debian): | |
status: | Unknown → Fix Released |
Changed in mmv (Ubuntu Mantic): | |
status: | Confirmed → In Progress |
assignee: | nobody → Sudip Mukherjee (sudipmuk) |
This has been fixed in 2.5.1-1, so Noble is unaffected. I have tested Noble and confirmed that the issue is not seen. I can reproduce the issue in Mantic.
Have also tested Lunar and confirmed that the issue is not seen.