bugGNU Octave - Bugs: bug #38974, Incorrect result in base64decode:


bug #38974: Incorrect result in base64decode:

Submitted by:  None
Submitted on:  Mon 13 May 2013 04:36:40 AM UTC  
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: None
Originator Name: Dave GOElOriginator Email: -unavailable-
Open/Closed: OpenRelease: 3.2.4
Operating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu 16 May 2013 08:07:53 PM UTC, comment #1:

Is this a duplicate of 38974?

John W. Eaton <jwe>
Project Administrator
Mon 13 May 2013 04:36:40 AM UTC, original submission:

It seems to me that base64decode doesn't understand padding correctly. Here, for example, it incorrectly returns extra 0's at the end of the decoded integers.

octave:203> assert(base64decode(base64encode("A")),double("A"))
error: assert (base64decode (base64encode ("A")),double ("A")) expected
but got
65 0 0
Dimensions don't match
error: called from:
error: /usr/share/octave/3.2.4/m/testfun/assert.m at line 209, column 5

(Notice that (a) char([65 0 0]) will display as simply a on the screen, causing you to think that you got the right answer;
(b) Simply truncating ending 0's is not right either. Sometimes, 0's are actually expected.)



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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by cdf (Updated the item)
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 16 May 2013 08:07:53 PM UTCjweStatusOctave Forge=>None
    Mon 13 May 2013 06:10:14 AM UTCcdfStatusNone=>Octave Forge

    Back to the top

    Powered by Savane 3.1-cleanup