This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 879a2c0f7a3775a98fcdb7cc8ed973ae8d4d7ea7 Mon Sep 17 00:00:00 2001 | |
From: Mans Rullgard <mans@mansr.com> | |
Date: Thu, 11 Jun 2020 21:40:06 +0100 | |
Subject: [PATCH] i2c: core: check returned size of emulated smbus block read | |
If the i2c bus driver ignores the I2C_M_RECV_LEN flag (as some of | |
them do), it is possible for an I2C_SMBUS_BLOCK_DATA read issued | |
on some random device to return an arbitrary value in the first | |
byte (and nothing else). When this happens, i2c_smbus_xfer_emulated() | |
will happily write past the end of the supplied data buffer, thus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From e8a299f4cb086653c250f61572315a61981e35c2 Mon Sep 17 00:00:00 2001 | |
From: Mans Rullgard <mans@mansr.com> | |
Date: Wed, 16 Jan 2019 14:33:53 +0000 | |
Subject: [PATCH] rtc: sunxi: use external oscillator | |
--- | |
drivers/rtc/rtc-sunxi.c | 3 +++ | |
1 file changed, 3 insertions(+) | |
diff --git a/drivers/rtc/rtc-sunxi.c b/drivers/rtc/rtc-sunxi.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- binutils/objdump.c.orig 2015-07-21 09:20:58.000000000 +0100 | |
+++ binutils/objdump.c 2015-11-17 14:47:35.047522396 +0000 | |
@@ -104,8 +104,8 @@ | |
static bfd_boolean formats_info; /* -i */ | |
static int wide_output; /* -w */ | |
static int insn_width; /* --insn-width */ | |
-static bfd_vma start_address = (bfd_vma) -1; /* --start-address */ | |
-static bfd_vma stop_address = (bfd_vma) -1; /* --stop-address */ | |
+static bfd_vma arg_start_address = (bfd_vma) -1; /* --start-address */ | |
+static bfd_vma arg_stop_address = (bfd_vma) -1; /* --stop-address */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/resource.h> | |
#include <sys/wait.h> | |
int main(int argc, char **argv) | |
{ | |
struct rusage ru; | |
pid_t p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* gives wrong result at -O3 */ | |
#include <stdio.h> | |
static void ac3_excite(int *excitep, int *band_psd, | |
int lowcomp, int is_lfe, int end) | |
{ | |
int excite[1] = { 0 }; | |
int band; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int foo(int a, int b) | |
{ | |
int d = 0; | |
int i; | |
for (i = 0; i < a; i++) { | |
int c = 0; | |
if (b > 1) | |
c = 1024 / b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* wrong output with pathcc -O1 | |
* the return value is not truncated to 32 bits */ | |
#include <stdio.h> | |
unsigned long foo(unsigned long a, unsigned b) | |
{ | |
b -= a; | |
return b; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
static void foo(void) | |
{ | |
puts("hello world"); | |
} | |
struct { | |
const int *data; | |
void (*func)(void); |