Skip to contentSkip to conversation

OSS msnd: fix array overflows

PATCH In review Adrian Bunk 2 participants 3 messages Jan 1, 2008 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 OSS msnd: fix array overflows

This patch fixes array overflows in the OSS msnd driver spotted by the Coverity checker.

---

This patch has been sent on:
- 27 Oct 2007

97463a59dfb9ccb915d3b615225c98cb3e310c0a

sound/oss/msnd.h +2 -2
index 05cf786..d0ca582 100644
@@ -233,8 +233,8 @@ typedef struct multisound_dev {
 	spinlock_t lock;
 	int nresets;
 	unsigned long recsrc;
-	int left_levels[16];
-	int right_levels[16];
+	int left_levels[32];
+	int right_levels[32];
 	int mixer_mod_count;
 	int calibrate_signal;
 	int play_sample_size, play_sample_rate, play_channels;
#1 lore raw

then it is auch to 2.6.22-stable?

Quoted 33 lines · Adrian Bunk

This patch fixes array overflows in the OSS msnd driver spotted by the Coverity checker.

---

This patch has been sent on:
- 27 Oct 2007

97463a59dfb9ccb915d3b615225c98cb3e310c0a

sound/oss/msnd.h +2 -3
index 05cf786..d0ca582 100644
@@ -233,8 +233,8 @@ typedef struct multisound_dev {
 	spinlock_t lock;
 	int nresets;
 	unsigned long recsrc;
-	int left_levels[16];
-	int right_levels[16];
+	int left_levels[32];
+	int right_levels[32];
 	int mixer_mod_count;
 	int calibrate_signal;
 	int play_sample_size, play_sample_rate, play_channels;
 
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Thanks,
Oliver
#2 lore raw
Quoted 1 line · Oliver Pinter (Pintér Olivér)

then it is auch to 2.6.22-stable?

That's a very old bug in a driver for ancient hardware, so there's no need to hurry.

Quoted 22 lines · Adrian Bunk
Quoted 21 lines

This patch fixes array overflows in the OSS msnd driver spotted by the Coverity checker.

---

This patch has been sent on:
- 27 Oct 2007

97463a59dfb9ccb915d3b615225c98cb3e310c0a

sound/oss/msnd.h +0 -2
index 05cf786..d0ca582 100644
@@ -233,8 +233,8 @@ typedef struct multisound_dev {
 	spinlock_t lock;
 	int nresets;
 	unsigned long recsrc;
-	int left_levels[16];
-	int right_levels[16];
Quoted 8 lines

sound/oss/msnd.h typedef struct multisound_dev { · line 240

Quoted 5 lines
sound/oss/msnd.h +2 -0
+	int left_levels[32];
+	int right_levels[32];
 	int mixer_mod_count;
 	int calibrate_signal;
 	int play_sample_size, play_sample_rate, play_channels;

Thanks,
Oliver

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed