After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730379 - e-proxy: Eliminate use of undefined C behaviour
e-proxy: Eliminate use of undefined C behaviour
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2014-05-19 13:57 UTC by Philip Withnall
Modified: 2014-11-03 16:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
e-proxy: Eliminate use of undefined C behaviour (1.11 KB, patch)
2014-05-19 13:57 UTC, Philip Withnall
committed Details | Review
e-proxy: Eliminate more use of undefined C behaviour (1.36 KB, patch)
2014-11-01 13:33 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2014-05-19 13:57:03 UTC
Patch attached. Kittens saved. Unicorns and rainbows appear.
Comment 1 Philip Withnall 2014-05-19 13:57:05 UTC
Created attachment 276778 [details] [review]
e-proxy: Eliminate use of undefined C behaviour

As much as this works fine in practice (because the function returns an
error, so mask->s_addr should never be used), we should avoid undefined
behaviour. Apparently it kills kittens.

Coverity issue: #1214484
Comment 2 Matthew Barnes 2014-05-19 14:09:03 UTC
In practice, EProxy is no longer used.  ESource also covers proxies now.

But if it makes Coverity happy, I've no objection.  Commit to master and evolution-data-server-3-12 branches.
Comment 3 Philip Withnall 2014-05-20 10:10:36 UTC
Attachment 276778 [details] pushed as 486db77 - e-proxy: Eliminate use of undefined C behaviour
Comment 4 Philip Withnall 2014-11-01 13:33:21 UTC
Created attachment 289778 [details] [review]
e-proxy: Eliminate more use of undefined C behaviour

The previous fix for this issue (commit 486db77e) did not eliminate
the undefined behaviour in the case where width == 32.

Fix that by explicitly handling it separately.

Coverity issue: #1214484
Comment 5 Philip Withnall 2014-11-01 13:34:08 UTC
Looking at recent Coverity logs, the original fix didn’t completely remove the undefined behaviour (my bad, sorry). The updated patch should do.
Comment 6 Milan Crha 2014-11-03 10:18:28 UTC
Review of attachment 289778 [details] [review]:

Okay, please commit to sources. Thanks.
Comment 7 Philip Withnall 2014-11-03 16:05:16 UTC
Pushed, thanks.

Attachment 289778 [details] pushed as 81353fa - e-proxy: Eliminate more use of undefined C behaviour