| Summary: | provides/conflicts/requires/obsoletes not parsed properly when they contain square brackets | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Pascal Terjan <pterjan> |
| Component: | RPM Packages | Assignee: | Thierry Vignaud <thierry.vignaud> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | perl-URPM | CVE: | |
| Status comment: | |||
| Attachments: |
Patch adding a test reproducing the problem
Patch adding the test and a fix making it pass |
||
|
Description
Pascal Terjan
2021-04-20 21:30:14 CEST
Created attachment 12658 [details]
Patch adding a test reproducing the problem
Reading the source, it should not happen when the header is present.
A test using synthesis reproduced the problem, attaching it.
The assumption that [] can not be in the name part is at several places unfortunately. Pkg_obsoletes_overlap Urpm_ranges_overlap callback_list_str_overlap return_list_str update_provides update_obsoletes Assigning to perl-URPM maintainer. Assignee:
bugsquad =>
thierry.vignaud I started looking into it yesterday, I wanted to create a new parsing function but it was less easy than expected as the code currently modifies original string to add '\0' and use parts of it and then restores the string so I think a separate function would need to allocate new strings and they would need to be released afterwards. Alternatively it could give a struct name, namelen or end of name, etc Created attachment 12663 [details]
Patch adding the test and a fix making it pass
Here is what I wrote last night, it makes the test pass but should be cleaned up.
Attachment 12658 is obsolete:
0 =>
1 |