Index: uspace/lib/riff/src/chunk.c
===================================================================
--- uspace/lib/riff/src/chunk.c	(revision f05f413833a5111b7083577d666c37f4be97cdcc)
+++ uspace/lib/riff/src/chunk.c	(revision bad765aeead3c3c8a80a051d57b663e07ef71cf2)
@@ -146,4 +146,6 @@
 	long pos;
 	long cksize;
+	uint8_t pad;
+	size_t nw;
 	errno_t rc;
 
@@ -153,6 +155,11 @@
 
 	cksize = pos - wchunk->ckstart;
-	if (pos % 2 != 0)
+	if (pos % 2 != 0) {
 		++pos;
+		pad = 0;
+		nw = fwrite(&pad, 1, sizeof(pad), rw->f);
+		if (nw != sizeof(pad))
+			return EIO;
+	}
 
 	if (fseek(rw->f, wchunk->ckstart - 4, SEEK_SET) < 0)
@@ -476,5 +483,4 @@
 	uint8_t byte;
 	size_t nread;
-	errno_t rc;
 
 	ckend = riff_rchunk_get_ndpos(rchunk);
@@ -483,10 +489,9 @@
 		/* (Buffered) reading is faster than seeking */
 		while (rchunk->riffr->pos < ckend) {
-			rc = riff_read(rchunk, &byte, sizeof(byte), &nread);
-			if (rc != EOK)
-				return rc;
-
+			nread = fread(&byte, 1, sizeof(byte), rchunk->riffr->f);
 			if (nread != sizeof(byte))
 				return EIO;
+
+			rchunk->riffr->pos += sizeof(byte);
 		}
 
@@ -495,4 +500,5 @@
 		if (fseek(rchunk->riffr->f, ckend, SEEK_SET) < 0)
 			return EIO;
+
 		rchunk->riffr->pos = ckend;
 	}
