[Pidgin] #16327: protobuf-c UB fixes (Gadu protocol)

Pidgin trac at pidgin.im
Wed Aug 27 02:14:01 EDT 2014

#16327: protobuf-c UB fixes (Gadu protocol)
 Reporter:  JIghtuse  |      Owner:  EionRobb
     Type:  patch     |     Status:  new
Milestone:            |  Component:  unclassified
  Version:  3.0.0hg   |   Keywords:  UB, Gadu, protobuf, protobuf-c
 I run scan-build from the Clang/LLVM project to check Pidgin on build. It
 found 11 problems. Some of them not really a bugs, some are. Full report
 attached as archive scan-build-2014-08-27-1.zip.

 This patch fixes two bugs in protobuf-c, included in Gadu protocol. Both
 of them is undefined behaviour in memcpy(). If we pass NULL pointer as
 source or destination, result of such operation is undefined. GCC-4.9 can
 break some code in such cases  (see
 [https://gcc.gnu.org/gcc-4.9/porting_to.html Null pointer checks may be
 optimized away more aggressively]). Similar changes already included in
 latest protobuf-c version].

Ticket URL: <https://developer.pidgin.im/ticket/16327>
Pidgin <https://pidgin.im>

More information about the Tracker mailing list