From 3f29b6d136d87ae5ca15c9f839b0e406e8aa1b71 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 30 Apr 2023 04:17:11 -0400 Subject: opk/write: Fix fwrite() --- (limited to 'src') diff --git a/src/opk/write.c b/src/opk/write.c index 12a36c6..1b490ee 100644 --- a/src/opk/write.c +++ b/src/opk/write.c @@ -34,8 +34,7 @@ _opkg_opk_opk_write_file(void *user_data, size_t size) { struct opkg_opk_opk *opk = user_data; - if (fwrite(opk->file_buffer, 1, sizeof(opk->file_buffer), opk->file) == - size) { + if (fwrite(opk->file_buffer, 1, size, opk->file) == size) { return OPKG_OPK_OK; } else { return OPKG_OPK_ERROR; -- cgit v0.9.1