From 3e4c26eeb701d96aa73bd482d48140f229cd9079 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 14 Jan 2023 21:58:26 +0000 Subject: Fix a sizeof blunder I happened to notice recently Nobody seems to have been affected by this in the wild yet, thank goodness. Will probably be a while before there's an actual release, so hopefully people will continue not to be affected. I suppose it's only an issue for paths longer than 128 characters, so it's not too likely to matter under normal circumstances... --- LICENCE | 2 +- dist/LICENCE.linux | 9 +++++---- dist/LICENCE.windows | 9 +++++---- src/demorec.c | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/LICENCE b/LICENCE index 31f7963..3b765fb 100644 --- a/LICENCE +++ b/LICENCE @@ -1,6 +1,6 @@ Except where otherwise noted, the following terms apply: ════════════════════════════════════════════════════════════════════════════════ -Copyright © 2022 Michael Smith +Copyright © 2023 Michael Smith Copyright © 2022 Willian Henrique Copyright © 2022 Hayden K diff --git a/dist/LICENCE.linux b/dist/LICENCE.linux index 078d8fc..c8f98dd 100644 --- a/dist/LICENCE.linux +++ b/dist/LICENCE.linux @@ -1,8 +1,8 @@ Source Speedrun Tools is released under the following copyright licence: ════════════════════════════════════════════════════════════════════════════════ -Copyright © 2022 Michael Smith +Copyright © 2023 Michael Smith Copyright © 2022 Willian Henrique -Copyright © 2022 Hayden K +Copyright © 2022 Hayden K Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice @@ -20,5 +20,6 @@ Please respect these terms when distributing copies of sst.so — doing so is as simple as keeping this LICENCE file in place. Thanks, and have fun! :^) ══ Additional acknowledgement ══ -This software contains public-domain code from https://monocypher.org/ — though -it is not required, we wish to thank the Monocypher authors for their hard work. +This software contains code that was placed into the public domain by Loup +Vaillant, Michael Savage and Fabio Scotoni. Though we are not required to do so, +we wish to think these people for their hard work. diff --git a/dist/LICENCE.windows b/dist/LICENCE.windows index 6bff572..4f56e46 100644 --- a/dist/LICENCE.windows +++ b/dist/LICENCE.windows @@ -1,8 +1,8 @@ Source Speedrun Tools is released under the following copyright licence: ════════════════════════════════════════════════════════════════════════════════ -Copyright © 2022 Michael Smith +Copyright © 2023 Michael Smith Copyright © 2022 Willian Henrique -Copyright © 2022 Hayden K +Copyright © 2022 Hayden K Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice @@ -20,5 +20,6 @@ Please respect these terms when distributing copies of sst.dll — doing so is a simple as keeping this LICENCE file in place. Thanks, and have fun! :^) ══ Additional acknowledgement ══ -This software contains public-domain code from https://monocypher.org/ — though -it is not required, we wish to thank the Monocypher authors for their hard work. +This software contains code that was placed into the public domain by Loup +Vaillant, Michael Savage and Fabio Scotoni. Though we are not required to do so, +we wish to think these people for their hard work. diff --git a/src/demorec.c b/src/demorec.c index 4434534..307e751 100644 --- a/src/demorec.c +++ b/src/demorec.c @@ -1,6 +1,6 @@ /* * Copyright © 2021 Willian Henrique - * Copyright © 2022 Michael Smith + * Copyright © 2023 Michael Smith * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -107,7 +107,7 @@ static void hook_record_cb(const struct con_cmdargs *args) { int gdlen = os_strlen(gameinfo_gamedir); if (gdlen + 1 + argdirlen < PATH_MAX) { // if not, too bad os_char dir[PATH_MAX], *q = dir; - memcpy(q, gameinfo_gamedir, gdlen * sizeof(gameinfo_gamedir)); + memcpy(q, gameinfo_gamedir, gdlen * sizeof(*gameinfo_gamedir)); q += gdlen; *q++ = OS_LIT('/'); // ascii->wtf16 (probably turns into memcpy() on linux) -- cgit v1.2.3