projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b7243e0
)
Fix a bug in the compress filter in case of odd buffer sizes.
author
Andre Noll
<maan@systemlinux.org>
Tue, 5 Jan 2010 22:07:29 +0000
(23:07 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Tue, 5 Jan 2010 22:07:29 +0000
(23:07 +0100)
compress_filter.c
patch
|
blob
|
history
error.h
patch
|
blob
|
history
diff --git
a/compress_filter.c
b/compress_filter.c
index 14df8d966128556e32957749b91bdd225730b1c1..a0b53bde61a093b7c9a07595df6af51a8cc1cb65 100644
(file)
--- a/
compress_filter.c
+++ b/
compress_filter.c
@@
-110,6
+110,10
@@
next_buffer:
return;
btr_merge(btrn, fn->min_iqs);
length = btr_next_buffer(btrn, &inbuf) & ~(size_t)1;
+ if (length == 0) { /* eof and 1 byte available */
+ ret = -E_COMPRESS_EOF;
+ goto err;
+ }
ip = (int16_t *)inbuf;
if (inplace)
op = ip;
diff --git
a/error.h
b/error.h
index 538c757ae2f5bdc53ca3d6b13cfb7845998d36d1..e47fa152410a90f3c03d876b6ca53786afc141f4 100644
(file)
--- a/
error.h
+++ b/
error.h
@@
-85,6
+85,7
@@
extern const char **para_errlist[];
#define COMPRESS_FILTER_ERRORS \
PARA_ERROR(COMPRESS_SYNTAX, "syntax error in compress filter config"), \
+ PARA_ERROR(COMPRESS_EOF, "compress: end of file"), \
#define WAV_FILTER_ERRORS \