• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libidn/0001-lib-punycode.c-decode_digit-Fix-integer-overflow.patch
Baruch SiachBaruch Siach committed 49cb795f79615 Sep 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From e9e81b8063b095b02cf104bb992fa9bf9515b9d8 Mon Sep 17 00:00:00 2001
2
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
3
Date: Fri, 1 Sep 2017 10:04:48 +0200
4
Subject: [PATCH] lib/punycode.c (decode_digit): Fix integer overflow
5
​
6
This fix is a backport from libidn2 and addresses
7
CVE-2017-14062.
8
​
9
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
10
---
11
Upstream status: commit e9e81b8063b095
12
​
13
 lib/punycode.c | 6 +++---
14
 1 file changed, 3 insertions(+), 3 deletions(-)
15
​
16
diff --git a/lib/punycode.c b/lib/punycode.c
17
index 86819a7deb85..49250a13e2cc 100644
18
--- a/lib/punycode.c
19
+++ b/lib/punycode.c
20
@@ -88,10 +88,10 @@ enum
21
 /* point (for use in representing integers) in the range 0 to */
22
 /* base-1, or base if cp does not represent a value.          */
23
 
24
-static punycode_uint
25
-decode_digit (punycode_uint cp)
26
+static unsigned
27
+decode_digit (int cp)
28
 {
29
-  return cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
30
+  return (unsigned) cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
31
     cp - 97 < 26 ? cp - 97 : base;
32
 }
33
 
34
-- 
35
2.14.1
36
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.