From 35e895c7dc096376cb89e14ea46008294bad314d Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Mon, 3 Feb 2014 16:53:45 +0000 Subject: [PATCH] hda driver: don't read uninitialized memory git-svn-id: svn://kolibrios.org@4555 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/audio/intel_hda/CODEC.INC | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/audio/intel_hda/CODEC.INC b/drivers/audio/intel_hda/CODEC.INC index fcf1dcb502..3e8f474ed0 100644 --- a/drivers/audio/intel_hda/CODEC.INC +++ b/drivers/audio/intel_hda/CODEC.INC @@ -833,6 +833,7 @@ proc read_pin_defaults test eax, eax jz .err_out mov [codec.init_pins], eax + mov [codec.num_pins], 0 mov edi, eax ;Asper ] @@ -855,19 +856,14 @@ end if mov [edi + HDA_PINCFG.nid], bx stdcall snd_hda_codec_read, ebx, 0, AC_VERB_GET_CONFIG_DEFAULT, 0 mov [edi + HDA_PINCFG.cfg], eax + add edi, HDA_PINCFG.sizeof + inc [codec.num_pins] .continue: - add edi, HDA_PINCFG.sizeof inc ebx dec ecx jnz .next_node -;Asper [ - and ebx, 0xFFFF - sub bx, [codec.start_nid] - mov [codec.num_pins], ebx -;Asper ] - pop edi edx ecx ebx xor eax, eax ret