Closed tsawyer closed 2 months ago
Looks like that was caused by the last commit: https://github.com/AllStarLink/app_rpt/commit/7bee59dba1be80ccbebecd921601ace63e154e72#diff-b71936b109832880d4b4d82f2a2282eee22b07b5625b3cf084def92abdba946cR775
Which platform are you compiling on? I'm curious why the Debian CI didn't fail when building this.
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Here's a patch that should resolve that issue:
diff --git a/utils/radio-tune-menu.c b/utils/radio-tune-menu.c
index 6393ab2..23c5f74 100644
--- a/utils/radio-tune-menu.c
+++ b/utils/radio-tune-menu.c
@@ -767,12 +767,12 @@ static void menu_swapusb(void)
{
char str[100];
int i;
-
+
printf("\nPlease select from the following methods for %s:\n", value_name);
-
+
for (i = 0; i < max_items; i++) {
snprintf(str, sizeof(str) - 1, "%d) %s %s\n", i + 1, items[i], selection == i ? "- Current" : "");
- printf(str);
+ printf("%s", str);
}
printf("Select new %s or C/R for current): ", value_name);
That said, the snprintf + printf combo seems unnecessary to me.
Directions to apply this please.
root@Angel-ASL3:/usr/src/app_rpt# patch tune-patch.diff /usr/src/app_rpt/utils/radio-tune-menu.c
patch: **** Only garbage was found in the patch input.
root@Angel-ASL3:/usr/src/app_rpt# cat tune-patch.diff
diff --git a/utils/radio-tune-menu.c b/utils/radio-tune-menu.c
index 6393ab2..23c5f74 100644
--- a/utils/radio-tune-menu.c
+++ b/utils/radio-tune-menu.c
@@ -767,12 +767,12 @@ static void menu_swapusb(void)
{
char str[100];
int i;
-
+
printf("\nPlease select from the following methods for %s:\n", value_name);
-
+
for (i = 0; i < max_items; i++) {
snprintf(str, sizeof(str) - 1, "%d) %s %s\n", i + 1, items[i], selection == i ? "- Current" : "");
- printf(str);
+ printf("%s", str);
}
printf("Select new %s or C/R for current): ", value_name);
patch utils/radio-tune-menu.c tune-patch.diff
patching file utils/radio-tune-menu.c
Hunk #1 FAILED at 767.
1 out of 1 hunk FAILED -- saving rejects to file utils/radio-tune-menu.c.rej
cat utils/radio-tune-menu.c.rej
--- radio-tune-menu.c
+++ radio-tune-menu.c
@@ -767,12 +767,12 @@ static void menu_swapusb(void)
{
char str[100];
int i;
-
+
printf("\nPlease select from the following methods for %s:\n", value_name);
-
+
for (i = 0; i < max_items; i++) {
snprintf(str, sizeof(str) - 1, "%d) %s %s\n", i + 1, items[i], selection == i ? "- Current" : "");
- printf(str);
+ printf("%s", str);
}
printf("Select new %s or C/R for current): ", value_name);
patch utils/radio-tune-menu.c tune-patch.diff patching file utils/radio-tune-menu.c Hunk #1 FAILED at 767. 1 out of 1 hunk FAILED -- saving rejects to file utils/radio-tune-menu.c.rej
cat utils/radio-tune-menu.c.rej --- radio-tune-menu.c +++ radio-tune-menu.c @@ -767,12 +767,12 @@ static void menu_swapusb(void) { char str[100]; int i; - + printf("\nPlease select from the following methods for %s:\n", value_name); - + for (i = 0; i < max_items; i++) { snprintf(str, sizeof(str) - 1, "%d) %s %s\n", i + 1, items[i], selection == i ? "- Current" : ""); - printf(str); + printf("%s", str); } printf("Select new %s or C/R for current): ", value_name);
You could just manually apply the change to the file, it's only that one line with the printf that's different.
Got it. Thank you. I'll leave this open until source is corrected.
One production attempt upgrade gives: