func: static int CVE_2012_1183_VULN_milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples) unsigned char buf [ AST_FRIENDLY_OFFSET + 640 ] ; const int maxsamples = ARRAY_LEN ( buf ) ; struct ast_frame wf . frametype = AST_FRAME_VOICE . offset = AST_FRIENDLY_OFFSET . src = __FUNCTION__ , wf . data . ptr = buf + AST_FRIENDLY_OFFSET; if ( samples > maxsamples )  samples = maxsamples; len = samples * sizeof ( buf [ 0 ] ); wf . datalen = len; wf . samples = samples; if ( ast_write ( chan , & wf ) < 0 )  ast_log ( LOG_WARNING , "Failed to write frame to '%s': %s\n" , chan -> name , strerror ( errno ) ); 