func: int CVE_2012_2652_PATCHED_bdrv_open(BlockDriverState *bs, const char *filename, int BlockDriver *drv) int ret ; if ( flags & BDRV_O_SNAPSHOT )  BlockDriverState * bs1 ; bs1 = bdrv_new ( "" ); ret = CVE_2012_2652_PATCHED_bdrv_open ( bs1 , filename , 0 , drv ); int CVE_2012_2652_PATCHED_bdrv_open(BlockDriverState *bs, const char *filename, int BlockDriver *drv) int ret ; if ( flags & BDRV_O_SNAPSHOT )  BlockDriverState * bs1 ; bs1 = bdrv_new ( "" ); ret = CVE_2012_2652_PATCHED_bdrv_open ( bs1 , filename , 0 , drv ); int CVE_2012_2652_PATCHED_bdrv_open(BlockDriverState *bs, const char *filename, int BlockDriver *drv) int ret ; if ( flags & BDRV_O_SNAPSHOT )  BlockDriverState * bs1 ; bs1 = bdrv_new ( "" ); ret = CVE_2012_2652_PATCHED_bdrv_open ( bs1 , filename , 0 , drv ); int CVE_2012_2652_PATCHED_bdrv_open(BlockDriverState *bs, const char *filename, int BlockDriver *drv) int ret ; char tmp_filename [ PATH_MAX ] ; if ( flags & BDRV_O_SNAPSHOT )  BlockDriverState * bs1 ; int is_protocol = 0 ; char backing_filename [ PATH_MAX ] ; bs1 = bdrv_new ( "" ); ret = CVE_2012_2652_PATCHED_bdrv_open ( bs1 , filename , 0 , drv ); if ( ret < 0 )  if ( bs1 -> drv && bs1 -> drv -> protocol_name )  is_protocol = 1; ret = get_tmp_filename ( tmp_filename , sizeof ( tmp_filename ) ); if ( ret < 0 )  if ( is_protocol )  snprintf ( backing_filename , sizeof ( backing_filename ) , "%s" , filename ); set_option_parameter ( options , BLOCK_OPT_BACKING_FILE , backing_filename ); pstrcpy ( backing_filename , sizeof ( backing_filename ) , bs -> backing_file ); path_combine ( backing_filename , sizeof ( backing_filename ) , filename , bs -> backing_file ); ret = CVE_2012_2652_PATCHED_bdrv_open ( bs -> backing_hd , backing_filename , back_flags , back_drv ); if ( ret < 0 )  return ret ; 