On 08/02/2010 05:49 PM, Jeff Cook wrote:
---
dlls/winealsa.drv/waveinit.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)

+    sprintf(description, "%s %d:%d", snd_pcm_info_get_name(infop), 
snd_pcm_info_get_card(infop),
Please use snprintf to prevent possible buffer overflow.

+    memcpy(ww->ds_desc.szDesc, description,
+            min( (sizeof(ww->ds_desc.szDesc) - 1), strlen(description)) );
This does not guarantee that ww->ds_desc.szDesc will be \0 terminated.

Vitaliy.


Reply via email to