[MERGED] openbsc[master]: nat: Fix initial buffer size parameter for getline

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
Mon Apr 24 10:01:20 UTC 2017


Pau Espin Pedrol has submitted this change and it was merged.

Change subject: nat: Fix initial buffer size parameter for getline
......................................................................


nat: Fix initial buffer size parameter for getline

According to man, lineptr must be set to null AND n to 0.

Change-Id: I36683884106b97ef697264716de13813c00da9bc
---
M openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Holger Freyther: Looks good to me, approved



diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
index 9291c89..633fa87 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c
@@ -169,7 +169,7 @@
 {
 	FILE *file;
 	char *line = NULL;
-	size_t n = 2342;
+	size_t n = 0;
 	struct nat_rewrite *res;
 
 	file = fopen(filename, "r");

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36683884106b97ef697264716de13813c00da9bc
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list