libosmo-netif[master]: osmux: Fix buffer overflow in osmux_snprintf

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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Tue Aug 15 08:55:55 UTC 2017


Patch Set 1:

Yes, and I see other issues in the current code, such as:
		ret = osmux_snprintf_header(buf+offset, size, osmuxh);
		if (ret < 0)
Which should not happen unless there's a parsing error inside osmux_snprintf_header, and in that case it should be better to not return a negative value IMHO.

This SNPRINTF_BUFFER_SIZE() macro looks quite difficult to follow, so I'm in favour of removing it and cleaning the entire code. I'll create a task to do this later, hopefully today.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8a7cc422c181c0c5712ac8976a5be5f0ad44a9c0
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-HasComments: No



More information about the gerrit-log mailing list