Skip to content

Instantly share code, notes, and snippets.

View kxxt's full-sized avatar
🎯
Focusing

Levi Zim kxxt

🎯
Focusing
View GitHub Profile
@kxxt
kxxt / execveat.c
Created October 23, 2023 07:28
execveat quirk reproduction
#include <stdio.h>
#include <linux/fcntl.h> /* Definition of AT_* constants */
#include <unistd.h>
int main()
{
char *argv[] = {"true", "-l", NULL};
char *envp[] = {"PATH=/bin", NULL};
int dirfd = open("/bin", O_RDONLY | O_DIRECTORY);
if (!dirfd)
@kxxt
kxxt / neochat.i
Created September 18, 2023 16:23
ICE source file
This file has been truncated, but you can view the full file.
namespace std {
typedef long unsigned int size_t;
typedef long int ptrdiff_t;
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) {
}
constexpr inline bool __is_constant_evaluated() noexcept {
return __builtin_is_constant_evaluated();
}
}
namespace std {
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c
index 635fcf7a8a8e..28c34a726666 100644
--- a/net/netfilter/xt_qtaguid.c
+++ b/net/netfilter/xt_qtaguid.c
@@ -739,7 +739,7 @@ static int iface_stat_fmt_proc_show(struct seq_file *m, void *v)
{
struct proc_iface_stat_fmt_info *p = m->private;
struct iface_stat *iface_entry;
- struct rtnl_link_stats64 dev_stats, *stats;
+ struct rtnl_link_stats64 *stats;