From 41724cbcdef11cb00fcd720c75d399288ea41fd0 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sun, 27 Jun 2010 21:13:01 +1000 Subject: Check return value of fwrite when copying files Check that writing to destination file actually occurs in _alpm_copyfile. Required adding a new error (PM_ERR_WRITE) as none of the others appeared appropriate. Prevents compiler warning when using -D_FORTIFY_SOURCE=2. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- lib/libalpm/alpm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 33291325..0c01f214 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -522,6 +522,7 @@ enum _pmerrno_t { PM_ERR_FILE_CONFLICTS, /* Misc */ PM_ERR_RETRIEVE, + PM_ERR_WRITE, PM_ERR_INVALID_REGEX, /* External library errors */ PM_ERR_LIBARCHIVE, -- cgit v1.2.3-24-g4f1b