enforce maximum sample size in sample cache

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@787 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-04-23 20:59:09 +00:00
parent cdba0527a8
commit e1ac42dd10
4 changed files with 11 additions and 6 deletions

View file

@ -133,6 +133,9 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c
pa_scache_entry *e;
assert(c && name);
if (chunk->length > PA_SCACHE_ENTRY_SIZE_MAX)
return -1;
if (!(e = scache_add_item(c, name)))
return -1;