buf was used as destination and as parameter to sprintf
which triggers an undefined behaviour.
This commit removes this usage of sprintf and uses strcat
to append strings to buf variable.
Signed-off-by: Francois Berder
---
board/freescale/t208xqds/eth_t208xqds.c | 40
rev_scheme is an unsigned integer and must not be printed
as a signed integer.
Signed-off-by: Francois Berder
---
board/raspberrypi/rpi/rpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index d996eb0cf6
Signed-off-by: Francois Berder
---
lib/slre.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/slre.c b/lib/slre.c
index e82a9e7635..e1a50443e0 100644
--- a/lib/slre.c
+++ b/lib/slre.c
@@ -686,6 +686,7 @@ int main(int argc, char *argv[])
}
if (!slre_compile(&slre, ar
The sess variable in open_channel was not entirely
cleared to zero at the start of this function.
This commit ensures that the entire struct is cleared.
Signed-off-by: Francois Berder
---
drivers/firmware/scmi/optee_agent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
String "/soc/fman/ethernet@e8000" is 25 bytes long
and not 24 due to extra byte for null character at
the end.
Signed-off-by: Francois Berder
---
board/keymile/kmcent2/kmcent2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/keymile/kmcent2/kmcent2.c b/boa
Arrays are not cleared entirely because ARRAY_SIZE
returns the number of elements in an array, not the size
in bytes.
This commit fixes the calls to memset by providing the
array size in bytes instead of the number of elements
in the array.
Signed-off-by: Francois Berder
---
drivers/clk/at91
Errors were handled only if an I2C transfer timed out
and received a NACK which is very unlikely. This commit
changes the condition such that errors are handled if
an I2C transfer times out or received a NACK.
Signed-off-by: Francois Berder
---
drivers/i2c/mtk_i2c.c | 2 +-
1 file changed, 1
Because unsigned integers cannot be negative,
timeout variable is never less than zero. Hence, checks
in Amlogic Meson ADC driver to detect timeouts always
evaluated to false. Fix that.
Signed-off-by: Francois Berder
---
Changes for v2:
- Replace timeout handling logic by
Because unsigned integers cannot be negative,
timeout variable is never less than zero. Hence, checks
in Amlogic Meson ADC driver to detect timeouts always
evaluated to false. Fix that.
Signed-off-by: Francois Berder
---
drivers/adc/meson-saradc.c | 6 --
1 file changed, 4 insertions(+), 2
9 matches
Mail list logo