From 2f7a7f3e6ac3d741bebd9e31f63d0bcf3f237774 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 20 Nov 2014 14:30:44 -0800 Subject: Prevent garbage from being saved in the userid field It seems that in some scenarios we end up with a string that isn't NUL terminated and that results in garbage being stored as userid. This patch is a little brute force but it fixes the problem even if a previous version os Subsurface ended up adding other text to the end of the userid. Signed-off-by: Dirk Hohndel --- save-git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'save-git.c') diff --git a/save-git.c b/save-git.c index 288917a29..8cde454f2 100644 --- a/save-git.c +++ b/save-git.c @@ -754,7 +754,7 @@ static void save_userid(void *_b) { struct membuffer *b = _b; if (prefs.save_userid_local) - put_format(b, "userid %30s", prefs.userid); + put_format(b, "userid %30s\n", prefs.userid); } static void save_one_device(void *_b, const char *model, uint32_t deviceid, -- cgit v1.2.3-70-g09d2