Bug #7744

Fix signed integer overflows Github #242

Added by Zachary Scott about 2 years ago. Updated about 1 year ago.

[ruby-core:51711]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v:2.0.0 Backport:

Description

=begin
From (()):

((*Signed integer overflow is undefined behavior in C. Many compilers assume no signed integer overflows and even optimize away overflow checks. The -fno-strict-overflow flag works around this issue in gcc, but doesn't fix the fundamentally broken code.*))

((*This patchset fixes signed integer overflows in time.c, ossl.c, and bigdecimal.c.*))

I've attached the associated patch.
=end

242.patch Magnifier (4.09 KB) Zachary Scott, 01/28/2013 02:14 AM

Associated revisions

Revision 44395
Added by Nobuyoshi Nakada about 1 year ago

ossl.c: integer overflow

  • ext/openssl/ossl.c (string2hex): fix signed integer overflow. [Bug #7744] [Fixes GH-242]

Revision 44395
Added by Nobuyoshi Nakada about 1 year ago

ossl.c: integer overflow

  • ext/openssl/ossl.c (string2hex): fix signed integer overflow. [Bug #7744] [Fixes GH-242]

History

#1 Updated by Koichi Sasada about 2 years ago

  • Assignee set to Nobuyoshi Nakada
  • Target version changed from next minor to 2.1.0

#2 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r44395.
Zachary, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


ossl.c: integer overflow

  • ext/openssl/ossl.c (string2hex): fix signed integer overflow. [Bug #7744] [Fixes GH-242]

Also available in: Atom PDF