buglibiconv - Bugs: bug #24214, off-by-1 bug in GBK

 
 

bug #24214: off-by-1 bug in GBK

Submitter:  None
Submitted:  Sat 06 Sep 2008 12:55:34 PM UTC
   
 
Category:  Converters Severity:  3 - Normal
Item Group:  None Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 06 Sep 2008 01:39:47 PM UTC, comment #1: 

Thank you very much! I have applied your patch.

Bruno Haible <haible>
Group administrator
Sat 06 Sep 2008 12:55:34 PM UTC, original submission:  

Index: gbk.h
===================================================================
--- gbk.h (revision 31)
+++ gbk.h (working copy)
@@ -135,6 +135,8 @@
     return 2;
   }
   if (wc >= 0x2170 && wc <= 0x2179) {
+    if (n < 2)
+      return RET_TOOSMALL;
     r[0] = 0xa2;
     r[1] = 0xa1 + (wc-0x2170);
     return 2;

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #16435:  off-by-1-GBK-fix.patch added by None (318B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2016-11-24 haible CategoryNone Converters
    2008-09-06 haible StatusNone Fixed
        Assigned toNone haible
        Open/ClosedOpen Closed
    2008-09-06 None Attached File- Added off-by-1-GBK-fix.patch, #16435

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code