Commit d75b26f
vsprintf: Fix potential unaligned access
The %p4cc specifier in some cases might get an unaligned pointer.
Due to this we need to make copy to local variable once to avoid
potential crashes on some architectures due to improper access.
Fixes: af612e4 ("lib/vsprintf: Add support for printing V4L2 and DRM fourccs")
Cc: Sakari Ailus <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent a229327 commit d75b26f
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
1771 | 1772 | | |
1772 | 1773 | | |
1773 | 1774 | | |
1774 | | - | |
| 1775 | + | |
1775 | 1776 | | |
1776 | 1777 | | |
1777 | 1778 | | |
1778 | 1779 | | |
1779 | 1780 | | |
1780 | 1781 | | |
1781 | 1782 | | |
1782 | | - | |
| 1783 | + | |
| 1784 | + | |
1783 | 1785 | | |
1784 | | - | |
| 1786 | + | |
1785 | 1787 | | |
1786 | 1788 | | |
1787 | 1789 | | |
1788 | 1790 | | |
1789 | 1791 | | |
1790 | 1792 | | |
1791 | | - | |
| 1793 | + | |
1792 | 1794 | | |
1793 | 1795 | | |
1794 | 1796 | | |
1795 | 1797 | | |
1796 | | - | |
| 1798 | + | |
1797 | 1799 | | |
1798 | 1800 | | |
1799 | 1801 | | |
| |||
0 commit comments