This repository was archived by the owner on Feb 12, 2025. It is now read-only.
Commit d299d67
committed
sixel_encoder_prepare_palette: kill use-after-free
The only place sixel_encoder_prepare_palette() is called
from is sixel_encoder_encode_frame(). If we have a
SIXEL_FAILED result inside the former, we unref the palette,
potentially freeing it. We then goto the error path for
sixel_encoder_encode_frame(), where we unref it again, in a
classic double-free. Remove the internal unref. As noted,
this is a single call site, so removing the unref can't
cause a memory leak.
Closes #27, reported by a4865g ("WuLearn").1 parent fb32912 commit d299d67
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
563 | | - | |
564 | 563 | | |
565 | 564 | | |
566 | 565 | | |
| |||
0 commit comments