summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 65bd4642..aea71db1 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -320,7 +320,8 @@ static int grep(const char *fn, const char *needle)
}
while(!feof(fp)) {
char line[1024];
- fgets(line, 1024, fp);
+ int sline = sizeof(line)-1;
+ fgets(line, sline, fp);
if(feof(fp)) {
continue;
}