Is the co-pilot itself performance-sensitive?
Is the co-pilot itself performance-sensitive?
Posted Sep 23, 2024 0:24 UTC (Mon) by ms-tg (subscriber, #89231)In reply to: Is the co-pilot itself performance-sensitive? by rweikusat2
Parent article: pcp: pmcd network daemon review (SUSE Security Team Blog)
> You'll have to appreciate the irony that the SUSE fix for this issue has undefined behaviour.
> - if (vindex < 0 || vindex > pdulen) {
> + if (vindex < 0 || (char *)&pdubuf[vindex] >= pduend) {
>
> The first (original line) is the wrong comparison. > It's wrong because vindex is used to index an array of __mPDU (32 bit with current definition) and not bytes. Correct code would be
>
> if (vindex < 0 || vindex > pdulen / sizeof(__pmPDU)) {
Question: is it worth someone making a tiny PR with this change and the explanation above?
