[PATCH] segmentation fault in NAS plugin of libao caused by integer overflow
Using (32 bit) int variables to store 32 bit unsigned integer values leads to integer overflows in the NAS plugin of libao. This bug is in versions 0.8.5 and 0.8.6 of libao (I didn't check older versions). The following patch fixes this problem:
diff -Naur libao-0.8.5/src/plugins/nas/ao_nas.c libao-0.8.5.new/src/plugins/nas/ao_nas.c
--- libao-0.8.5/src/plugins/nas/ao_nas.c 2003-07-14 04:59:10.000000000 +0200
+++ libao-0.8.5.new/src/plugins/nas/ao_nas.c 2005-05-18 09:48:45.843142463 +0200
@@ -61,8 +61,8 @@
AuFlowID flow;
AuDeviceID dev;
char *host;
- int buf_size;
- int buf_free;
+ int64_t buf_size;
+ int64_t buf_free;
} ao_nas_internal;
int ao_plugin_test()