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/baseband-devel@lists.osmocom.org/.
Dario Lombardo dario.lombardo at libero.itOn 01/25/2011 04:34 PM, Holger Hans Peter Freyther wrote: > On 01/25/2011 04:30 PM, Dario Lombardo wrote: > > awesome! > >> + case 'g': >> + snprintf(gps.device, 32, "%s", optarg); >> + LOGP(DGPS, LOGL_INFO, "Using GPS device %s\n", gps.device); > two issues there. > > 1.) you can use ARRAY_SIZE(gps.device) in case we ever shrink/increase this. > In reality this should be PATH_MAX/MAX_PATH or such. > > 2.) snprintf will not add a '\0' of optarg is of the length of 32 or longer > > Very good. This is the new patch that should fix both. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: dev.diff URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20110125/939229b0/attachment.ksh>