-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Upstream: https://git.sr.ht/~kennylevinsen/gtkgreet/commit/3471aaaaee4619fd4aded85803b27b4a8dff41a6 | ||
diff --git a/gtkgreet/proto.c b/gtkgreet/proto.c | ||
index 92619494a7..a527e85552 100644 | ||
--- a/gtkgreet/proto.c | ||
+++ b/gtkgreet/proto.c | ||
@@ -21,9 +21,13 @@ struct header { | ||
|
||
static int write_req(int fd, struct json_object* req) { | ||
const char* reqstr = json_object_get_string(req); | ||
- uint32_t len = strlen(reqstr); | ||
- char* headerp = (char*)&len; | ||
- ssize_t off = 0; | ||
+ size_t len = strlen(reqstr); | ||
+ if (len > 0xFFFFFFFF) { | ||
+ goto error; | ||
+ } | ||
+ uint32_t header = len; | ||
+ char* headerp = (char*)&header; | ||
+ uint32_t off = 0; | ||
|
||
while (off < 4) { | ||
ssize_t n = write(fd, &headerp[off], 4-off); | ||
@@ -51,7 +55,7 @@ static struct json_object* read_resp(int fd) { | ||
struct json_object* resp = NULL; | ||
char *respstr = NULL; | ||
uint32_t len; | ||
- ssize_t off = 0; | ||
+ uint32_t off = 0; | ||
|
||
while (off < 4) { | ||
char* headerp = (char*)&len; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
From 725846edf6a22f495fdbb2972bb559563a90262b Mon Sep 17 00:00:00 2001 | ||
From: Hugo Osvaldo Barrera <[email protected]> | ||
Date: Thu, 3 Nov 2022 12:45:49 +0100 | ||
Subject: [PATCH] Update reference to deprecated constant | ||
diff --git a/gtkgreet/gtkgreet.c b/gtkgreet/gtkgreet.c | ||
index addad5a..1cbed1d 100644 | ||
--- a/gtkgreet/gtkgreet.c | ||
+++ b/gtkgreet/gtkgreet.c | ||
@@ -93,7 +93,7 @@ static int gtkgreet_update_clocks_handler(gpointer data) { | ||
|
||
struct GtkGreet* create_gtkgreet() { | ||
gtkgreet = calloc(1, sizeof(struct GtkGreet)); | ||
- gtkgreet->app = gtk_application_new("wtf.kl.gtkgreet", G_APPLICATION_FLAGS_NONE); | ||
+ gtkgreet->app = gtk_application_new("wtf.kl.gtkgreet", G_APPLICATION_DEFAULT_FLAGS); | ||
gtkgreet->windows = g_array_new(FALSE, TRUE, sizeof(struct Window*)); | ||
gtkgreet->question_cnt = 1; | ||
return gtkgreet; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Template file for 'gtkgreet' | ||
pkgname=gtkgreet | ||
version=0.7 | ||
revision=1 | ||
build_style=meson | ||
hostmakedepends="pkg-config scdoc" | ||
makedepends="gtk+3-devel gtk-layer-shell-devel json-c-devel" | ||
depends="greetd" | ||
short_desc="Gtk greeter for greetd" | ||
maintainer="cinerea0 <[email protected]>" | ||
license="GPL-3.0-or-later" | ||
homepage="https://git.sr.ht/~kennylevinsen/gtkgreet" | ||
distfiles="https://git.sr.ht/~kennylevinsen/gtkgreet/archive/${version}.tar.gz" | ||
checksum=eb4ba0e1e4f9cf888ce7b932b923f97521c2277032628cfc06bb86fecbad9373 |