[PATCH] 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 10 13:46:19 UTC 2017


Review at  https://gerrit.osmocom.org/2287

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(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/87/2287/1

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: newchange
Gerrit-Change-Id: I36683884106b97ef697264716de13813c00da9bc
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list