Jonas Oreland 41e236aa59 Fix ubsan warning in ParseError testcase
The parse error testcase creates a random byte string
and tries to parse it as a delta attribute expecting it to fail.

Ubsan detected that there was "unsafe" static_cast<>, where
a value from network is static_casted:ed into a enum.
That enum was then *checked* for validity, so I think it was
same before aswell.

This fix changes to do the check/convering as one step.

Bug: webrtc:15392
Change-Id: Ie2534deef8988bc3c3179e194155cfd48b0ee6e5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343980
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41942}
2024-03-21 15:58:22 +00:00
..
2022-06-30 09:39:28 +00:00
2023-08-04 12:08:44 +00:00
2023-08-07 13:10:00 +00:00