osmocom-bb[master]: mobile/gsm322.c: prevent calling memset with n <= 0

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/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Sun Nov 5 14:52:44 UTC 2017


Patch Set 1:

> (1 comment)
 > 
 > If I interpret the code correctly it's impossible for 'value' to be
 > negative at this point. So it's just to get rid of compile warning?
 > If so than you could, perhaps, use size_t instead of int for
 > 'value' type: that's what memset expects anyway.

Thank you, Max! I think it would be better to replace memset by
a simple for-loop. This will also prevent possible buffer overruns
in case of incorrect values are passed.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d8d78474614939659a7f24d5007b1c890776b1a
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-HasComments: No



More information about the gerrit-log mailing list