openbsc[master]: ipaccess-config: properly create swload

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Mar 14 00:16:22 UTC 2017


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/2018/1/openbsc/src/ipaccess/ipaccess-config.c
File openbsc/src/ipaccess/ipaccess-config.c:

Line 629: 	load->file_id_len = strlen((char*)load->file_id) + 1;
> So why changing from header->firmware_info.sw_part -> load->file_id at all?
sw_part is the source string, which could have arbitrary length. After osmo_strlcpy(), we possibly have copied only a part of it, and thus I want to use the actual really present number of characters in the length indicator, instead of the length we would have liked to copy. Thus I count the string length of the target, here load->file_id, after the copy. I explained this in the commit log.


-- 
To view, visit https://gerrit.osmocom.org/2018
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2e34a1348a290d3f58dd830d08da65b94b3270db
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list