diff options
author | bapt <bapt@FreeBSD.org> | 2013-06-17 10:00:48 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-06-17 10:00:48 +0000 |
commit | 2b5579c9bdbbca29e7b2df1ee9a9e5d1cce2b06f (patch) | |
tree | d48b8f5f4c81e26e8dbb6597554286f1d6d53d3a /guage.c | |
parent | a94245b3d36b447d1f761028da7e072210e64b43 (diff) | |
download | FreeBSD-src-2b5579c9bdbbca29e7b2df1ee9a9e5d1cce2b06f.zip FreeBSD-src-2b5579c9bdbbca29e7b2df1ee9a9e5d1cce2b06f.tar.gz |
Update dialog to 1.2-20130523
Diffstat (limited to 'guage.c')
-rw-r--r-- | guage.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,9 +1,9 @@ /* - * $Id: guage.c,v 1.64 2011/10/20 23:34:35 tom Exp $ + * $Id: guage.c,v 1.65 2012/11/30 10:43:31 tom Exp $ * * guage.c -- implements the gauge dialog * - * Copyright 2000-2010,2011 Thomas E. Dickey + * Copyright 2000-2011,2012 Thomas E. Dickey * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License, version 2.1 @@ -94,6 +94,7 @@ read_data(char *buffer, FILE *fp) result = 0; } else if (fgets(buffer, MY_LEN, fp) != 0) { DLG_TRACE(("read_data:%s", buffer)); + buffer[MY_LEN] = '\0'; dlg_trim_string(buffer); result = 1; } else { @@ -182,7 +183,7 @@ handle_input(DIALOG_CALLBACK * cb) MY_OBJ *obj = (MY_OBJ *) cb; bool result; int status; - char buf[MY_LEN]; + char buf[MY_LEN + 1]; if (dialog_state.pipe_input == 0) { status = -1; |