Univention Bugzilla – Full Text Bug Listing |
Summary: | Logic errors: comparison of unsigned expression | ||
---|---|---|---|
Product: | UCS | Reporter: | Philipp Hahn <hahn> |
Component: | Listener (univention-directory-listener) | Assignee: | Philipp Hahn <hahn> |
Status: | CLOSED FIXED | QA Contact: | Arvid Requate <requate> |
Severity: | normal | ||
Priority: | P5 | Flags: | hahn:
Patch_Available+
|
Version: | UCS 4.0 | ||
Target Milestone: | UCS 4.1-2-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
What kind of report is it?: | --- | What type of bug is this?: | --- |
Who will be affected by this bug?: | --- | How will those affected feel about the bug?: | --- |
User Pain: | Enterprise Customer affected?: | ||
School Customer affected?: | ISV affected?: | ||
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | Bug group (optional): | ||
Max CVSS v3 score: | |||
Attachments: | Fix comparison of unsigned expression |
> univention_debug(UV_DEBUG_LISTENER, UV_DEBUG_ERROR, "last 100 bytes of previous entry:");
>- hex_dump(UV_DEBUG_ERROR, data, pos-1000 < 0 ? 0 : pos-1000, pos-1000 < 0 ? pos : 1000);
Also note: 100 in the message != 1000 in the dump
r69895 | Bug #38696 UDL: Fix comparison of signed values Package: univention-directory-listener Version: 10.0.0-11.315.201606071717 Branch: ucs_4.1-0 Scope: errata4.1-2 r69910 | Bug #22383,Bug #30227,Bug #30263,Bug #34324,Bug #34507,Bug #34738,Bug #3490,Bug #38696,Bug #39509,Bug #40600,Bug #41261: UDL YAML univention-directory-listener.yaml Code review: Ok Advisory: Ok |
Created attachment 6957 [details] Fix comparison of unsigned expression # make CC=clang -C src clang -g -Wall -Werror -D_FILE_OFFSET_BITS=64 -I/usr/include/db3 -DWITH_DB3 -c -o cache_lowlevel.o cache_lowlevel.c cache_lowlevel.c:270:44: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] hex_dump(UV_DEBUG_ERROR, data, pos-1000 < 0 ? 0 : pos-1000, pos-1000 < 0 ? pos : 1000); ~~~~~~~~ ^ ~ cache_lowlevel.c:270:73: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] hex_dump(UV_DEBUG_ERROR, data, pos-1000 < 0 ? 0 : pos-1000, pos-1000 < 0 ? pos : 1000); ~~~~~~~~ ^ ~