Closed
Bug 1294527
Opened 8 years ago
Closed 8 years ago
nestegg: value is outside the range of representable values of type 'unsigned long' in [@nestegg_duration] nestegg.c:2080
Categories
(Core :: Audio/Video: Playback, defect, P1)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox51 | --- | affected |
People
(Reporter: tsmith, Assigned: kinetik)
References
Details
(Keywords: testcase)
Attachments
(2 files)
I found this while fuzzing nestegg commit 4d261a4df28fc193ffa9360bffdb3dbe9947a44c
Run the attached test case in a Undefined Behavior Sanitizer (UBSan) build to trigger the following error:
src/nestegg.c:2080:32: runtime error: value 1.01615e+59 is outside the range of representable values of type 'unsigned long'
#0 0x4f28fd in nestegg_duration /home/user/code/nestegg/src/nestegg.c:2080:32
#1 0x4ea248 in main /home/user/code/nestegg/test/test.c:112:7
#2 0x7f798552982f in __libc_start_main /build/glibc-GKVZIf/glibc-2.23/csu/../csu/libc-start.c:291
#3 0x4188e8 in _start (/home/user/workspace/nestegg/test+0x4188e8)
Reporter | ||
Comment 1•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → kinetik
Assignee | ||
Comment 2•8 years ago
|
||
Fixes for this bug and bug 1294549.
For this bug: check that it's safe to convert unscaled_duration to a uint64_t before casting it.
For bug 1294549: treat a tc_scale of 0 as a hard error.
r? gerald since :rillian is away until Monday, but I can wait if you don't feel comfortable reviewing this code.
Attachment #8780355 -
Flags: review?(gsquelart)
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8780355 -
Flags: review?(gsquelart) → review?(giles)
Updated•8 years ago
|
Attachment #8780355 -
Flags: review?(giles) → review+
Reporter | ||
Comment 4•8 years ago
|
||
Verified fixed with nestegg revision 9b7b79412432df3c3f996b42eac19ce60d56ee48. Thanks!
Updated•8 years ago
|
Priority: -- → P1
Comment 5•8 years ago
|
||
Matthew: is this fixed, or can the patch can be landed?
Flags: needinfo?(kinetik)
Assignee | ||
Comment 6•8 years ago
|
||
Fixed by bug 1296988.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(kinetik)
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•