Get_http_uri_name probably a bug?


#1

Hi,

while working again with the Wizweb-Server I stumbled into this subroutine. There are two versions of this function in httpParser.c:
#ifndef OLD
uint8_t * get_http_uri_name(uint8_t * uri)…
#else
int8_t get_http_uri_name(uint8_t * uri, uint8_t * uri_buf)…

I think the first one is dangerous but used to separate the URI. Within this version a temporary buffer is defined on the stack frame and used later in httpServer.c. But at the time of usage the get_http_uri_name-suroutine is left and the stackframe is not valid any more. Please check if this is what you want to do. Even it is working, but…
Cheers,
Knut


#2

Hi, kschwi.

Are you using the latest firmware on GitHub?

First of all, the code is dangerous.
Our ioLibrary has been updated, but it does not apply to the 550WEB code.
(but it works well. It seems to be related to the characteristics of the ST chip.)

I fixed the source and will release soon.
You can check it in develop branch below.
https://github.com/Wiznet/WIZ550web/tree/develop

thanks.

Best regard,
Kei.


#3

Hi Kei,

I’m using the release 1.1. If you talk about the latest version it seems, that you talk about the development branch. Comparing the development branch with release 1.1 we both agree on the danger of the release. So please make your branch very soon to the next release.

Cheers,
Knut


#4

Hi.

I released it to the GitHub Master branch.
Thanks to you, we were able to proceed with the update we missed.

I will check and respond to your other questions.

Thank you :slight_smile: