michaelrsweet / pappl

PAPPL - Printer Application Framework
https://www.msweet.org/pappl
Apache License 2.0
310 stars 50 forks source link

log.c: Fix crash due negative buffer size #272

Closed zdohnal closed 1 year ago

zdohnal commented 1 year ago

A higher pointer address is subtracted from lower pointer address in write_log, which causes crash if pappl is built with _FORTIFY_SOURCE=3.

It can be reproduced by starting lprint service.

zdohnal commented 1 year ago

Ok, I didn't know Github project can be set to require signing - learnt something new :) .

michaelrsweet commented 1 year ago

[master 9637431] Fix a potential buffer overflow in the logging code (Issue #272)

[v1.3.x 0c69b3d] Mirror fix from master.

zdohnal commented 1 year ago

Thanks, @michaelrsweet !