Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ac70e863fb9d0bc897fecc7f29c405af20763bc5
https://github.com/WebKit/WebKit/commit/ac70e863fb9d0bc897fecc7f29c405af20763bc5
Author: Simon Pena <[email protected]>
Date: 2026-06-26 (Fri, 26 Jun 2026)
Changed paths:
M Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp
Log Message:
-----------
Regression(278316@main): [GLIB] IPC encoder desyncs on certificate extraction
failure
https://bugs.webkit.org/show_bug.cgi?id=317922
Reviewed by Claudio Saavedra.
ArgumentCoder<GRefPtr<GTlsCertificate>>::decode() unconditionally reads
a vector of cert data as its first field. The encoder, however, fails to
write anything if the certificate fails to produce its DER data. This
means that the decoder will go out of sync, reading subsequent elements
as if they were the certificate, which in turn can cause intermittent
crashes afterwards.
This is a regression from 278316@main. Before its refactoring, the
certificate size was unconditionally written, and when 0 the decoder
would handle it appropriately. After the refactoring, empty certificates
are skipped, and the 0 size is not communicated. This ensures an empty
vector is encoded on the failure path, so that decoder and encoder are
kept in sync.
No new tests: this would probably require IPC API tests to run for GLib
platforms.
* Source/WebKit/Shared/glib/ArgumentCodersGLib.cpp:
(IPC::ArgumentCoder<GRefPtr<GTlsCertificate>>::encode):
Canonical link: https://commits.webkit.org/315892@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications