Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base64_decode() issue #274

Closed
boria8 opened this issue Apr 20, 2017 · 8 comments
Closed

base64_decode() issue #274

boria8 opened this issue Apr 20, 2017 · 8 comments

Comments

@boria8
Copy link

boria8 commented Apr 20, 2017

i'm getting segfault on conversion of "MA==" base64 string to Opaque from utils_base64ToOpaque function in the following line:
*bufferP[result_index - 3] = (tmp[0] << 2) | (tmp[1] >> 4);

@dnav
Copy link
Contributor

dnav commented Apr 21, 2017

Yes, this implementation is bugged.
I am considering removing it as it is not used currently in wakaama and it is not exposed.

@boria8
Copy link
Author

boria8 commented Apr 21, 2017

actually i think that such api is required(#273 ), i'm not sure that the best way is to implement it from scratch.

@dnav
Copy link
Contributor

dnav commented Apr 21, 2017

In #271 I moved the base64 decode function to examples/shared/commandline.c until we figure something adressing #273.

@dnav
Copy link
Contributor

dnav commented Apr 26, 2017

utils_base64ToOpaque() is now base64_decode() and part of examples/shared

@dnav dnav changed the title utils_base64ToOpaque API issue base64_decode() issue Apr 26, 2017
@dnav dnav added the examples label Apr 26, 2017
@boria8
Copy link
Author

boria8 commented Apr 26, 2017

Is there a plan to fix this api?

@dnav
Copy link
Contributor

dnav commented Apr 26, 2017

Personnaly, like every other issues tagged examples, it is pretty low on my TODO list.
base64 is very common so it should be easy to replace the code with a working version.

@sbertin-telular
Copy link
Contributor

I think this is resolved by utils_base64Decode introduced in #428.

@sbernard31 sbernard31 added the bug label Nov 3, 2020
@sbernard31
Copy link
Contributor

It should be fixed.
(should if be backported in a 1.x version ? #487)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants