logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0006-Fix-uninitialized-variable-access.patch (1719B)


  1. From 0cbb9f6afb0e9274ccdf8b3390c45afd6576b540 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Sat, 16 Mar 2024 18:08:08 -0700
  4. Subject: [PATCH] Fix uninitialized variable access
  5. ---
  6. src/pcm/pcm.c | 6 ++++--
  7. 1 file changed, 4 insertions(+), 2 deletions(-)
  8. diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
  9. index 23b27697..14d868a8 100644
  10. --- a/src/pcm/pcm.c
  11. +++ b/src/pcm/pcm.c
  12. @@ -5321,7 +5321,7 @@ EXPORT_SYMBOL int INTERNAL(snd_pcm_hw_params_get_period_size_min)(const snd_pcm_
  13. int snd_pcm_hw_params_get_period_size_min(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir)
  14. #endif
  15. {
  16. - unsigned int _val = *val;
  17. + unsigned int _val;
  18. int err = snd_pcm_hw_param_get_min(params, SND_PCM_HW_PARAM_PERIOD_SIZE, &_val, dir);
  19. if (err >= 0)
  20. *val = _val;
  21. @@ -5343,7 +5343,7 @@ EXPORT_SYMBOL int INTERNAL(snd_pcm_hw_params_get_period_size_max)(const snd_pcm_
  22. int snd_pcm_hw_params_get_period_size_max(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val, int *dir)
  23. #endif
  24. {
  25. - unsigned int _val = *val;
  26. + unsigned int _val;
  27. int err = snd_pcm_hw_param_get_max(params, SND_PCM_HW_PARAM_PERIOD_SIZE, &_val, dir);
  28. if (err >= 0)
  29. *val = _val;
  30. @@ -6277,6 +6277,7 @@ EXPORT_SYMBOL int INTERNAL(snd_pcm_hw_params_set_tick_time_first)(snd_pcm_t *pcm
  31. int snd_pcm_hw_params_set_tick_time_first(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
  32. #endif
  33. {
  34. + *val = 0;
  35. return 0;
  36. }
  37. @@ -6296,6 +6297,7 @@ EXPORT_SYMBOL int INTERNAL(snd_pcm_hw_params_set_tick_time_last)(snd_pcm_t *pcm
  38. int snd_pcm_hw_params_set_tick_time_last(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir)
  39. #endif
  40. {
  41. + *val = 0;
  42. return 0;
  43. }
  44. --
  45. 2.44.0