Attention is currently required from: Timur Davydov, fixeria, laforge, neels, 
osmith.

pespin has posted comments on this change by Timur Davydov. ( 
https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email )

Change subject: Add Emscripten build support and JS callback logging backend
......................................................................


Patch Set 25: Code-Review-1

(4 comments)

Patchset:

PS25:
Now that the build part is solved, I looked a bit more in detail at the C logic 
and found some flaws, please fix the comments and resubmit.


File src/core/logging_emscripten.c:

https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/c861d323_3c25ec3e?usp=email
 :
PS25, Line 44:  const int msgLen = 4096;
Use MAX_LOG_SIZE from ./include/osmocom/core/logging_internal.h instead.


https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/d771449b_7e3c2140?usp=email
 :
PS25, Line 47:  char subsys_buf[16];
why is this 16 bytes?


https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/fca1ba80_130cb978?usp=email
 :
PS25, Line 57:          if (msg[rc - 1] == '\n') msg[rc - 1] = '\0';
man vsnprintf:

    If the output was truncated due to this limit, then the return value is the 
number of characters (excluding the terminating null byte) which would have 
been written to the final string if  enough  space
       had been available.

You may be writing out of "msg" here if the input string is more than 4096 
chars.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 25
Gerrit-Owner: Timur Davydov <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-CC: laforge <[email protected]>
Gerrit-Attention: osmith <[email protected]>
Gerrit-Attention: neels <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Attention: Timur Davydov <[email protected]>
Gerrit-Comment-Date: Tue, 03 Feb 2026 17:07:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes

Reply via email to