• src/xpdev/ini_file.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, February 07, 2024 10:17:48
    https://gitlab.synchro.net/main/sbbs/-/commit/d2f5d55133310a6c03b91057
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    No strtoull() for Borland

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, February 07, 2024 10:21:35
    https://gitlab.synchro.net/main/sbbs/-/commit/cea188d03b824bafaf7b4622
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix reversed logic of previous commit.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, February 20, 2024 15:56:44
    https://gitlab.synchro.net/main/sbbs/-/commit/4fd02c4efa228d777db94785
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Partial fix of iniGetSString() and iniReadSString()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, February 20, 2024 16:06:14
    https://gitlab.synchro.net/main/sbbs/-/commit/b29d43752c47abff892b5083
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Finish fixing ini*SString().

    The first fix was to copy the right value, the second fix was to
    ensure zero-length strings are terminated.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, February 20, 2024 16:20:01
    https://gitlab.synchro.net/main/sbbs/-/commit/ddcb536755e002a0985a8f48
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix (incorrect) warning from gcc12

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, February 21, 2024 05:43:42
    https://gitlab.synchro.net/main/sbbs/-/commit/fbd2315bd2647948b18e26ae
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    And now Coverity gets into the false warning game.

    Fix incorrect Coverity issue that speculates this may return fval.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, February 21, 2024 06:30:32
    https://gitlab.synchro.net/main/sbbs/-/commit/fd41db08baa65e68618163f9
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Cast away warning...

    This is why I returned ret. :D

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, February 21, 2024 09:59:19
    https://gitlab.synchro.net/main/sbbs/-/commit/2995f851439e440f60587b87
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Bugfix and more paranoia in ini*SString() functions.

    Bugfis: Be sure to terminate value if returning deflt.
    Paranoia: Terminate value if iniGetString() returns NULL

    I think the only way to trigger the paranoia is to pass NULL as the
    default when reading a key that's not present.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, March 04, 2024 18:23:44
    https://gitlab.synchro.net/main/sbbs/-/commit/92088f9983ef38fc376208c2
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    For name ints/enums, allow the value to be longer than the name

    This allows me to shorten "Informational" to "Info" and "Debugging" to "Debug" and be backward compatible with existing .ini files. I think "Info" and
    "Debug" are universally known and take up less space (e.g. in SCFG).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, January 24, 2025 16:12:05
    https://gitlab.synchro.net/main/sbbs/-/commit/3458846794cc2cb002c46b58
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    fseek() after ftruncate()

    Ensure the stream is in a meaningful place.
    Fixes a bug, but one we're unlikely to have ever seen the way we use
    this.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Saturday, September 27, 2025 16:04:54
    https://gitlab.synchro.net/main/sbbs/-/commit/264234a8af6521996a8a672c
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Allow iniRemoveSection[Fast] to remove the root section

    Fixes crash reported by Deuce when trying to iniCutSection(..., ROOT_SECTION):

    0x00000000007e9b08 in section_match (name=0x7fffffff6dd1 "Flickering...", compare=0x0, case_sensitive=true)
    at ini_file.c:95
    0x00000000007e0df0 in find_section_index (list=0x8056bebc0, section=0x0) at ini_file.c:166
    0x00000000007e167d in iniRemoveSectionFast (list=0x8056bebc0, section=0x0) at ini_file.c:452
    0x00000000007e1756 in iniCutSection (list=0x8056bebc0, section=0x0) at ini_file.c:467

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 02:24:34
    https://gitlab.synchro.net/main/sbbs/-/commit/48edf261f03df00cb5520067
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Add support for root sections to iniParse and friends

    Needed by SyncTERM.

    Note, the error handling of iniParseSections() has changed somewhat... Previously, on an allocation failure, it would return whatever it
    had managed to parse so far with no indication of failure.

    Now, it returns NULL.

    Previously, NULL would be returned if there were no sections.

    Now, NULL will not be returned if there's any global comments, and
    will not be returned if there's any key/value pairs in the global
    section.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 02:24:34
    https://gitlab.synchro.net/main/sbbs/-/commit/8bd0e4b7cbc4c72296d9f9fe
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Braces for Microsoft...

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 02:40:10
    https://gitlab.synchro.net/main/sbbs/-/commit/92d03abf99c1595a1b36a317
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Move stuff around and maybe MSVC won't crash anymore?

    It looks like MSVC is just crashing in random places.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 02:46:32
    https://gitlab.synchro.net/main/sbbs/-/commit/09bdfecc36d178b8c577df23
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Bah, obviously using a variable before setting it doesn't work

    Just expand this and do it the verbose, hard-to-understand way
    because Microsoft still doesn't support C99.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 02:51:45
    https://gitlab.synchro.net/main/sbbs/-/commit/aee17105432b3500c4ed1de5
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fine, I'll at least make the code readable...

    It's still not great due to MSVC, but at least it's not gross.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 07:57:27
    https://gitlab.synchro.net/main/sbbs/-/commit/c02ffa3dbf586d1818ab4d04
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix crash when there is no root section

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 09:34:20
    https://gitlab.synchro.net/main/sbbs/-/commit/5858834edbaf6c9f8bdd308e
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix comments

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 11:26:05
    https://gitlab.synchro.net/main/sbbs/-/commit/afc6f520a36b00b1129fc495
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Optimize large INI parsing some more

    Have iniParseSections() sort the section list, then use bsearch()
    to find the section.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 11:38:07
    https://gitlab.synchro.net/main/sbbs/-/commit/34403c1aa40735044f4d9a2f
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Revert "Optimize large INI parsing some more"

    This reverts commit afc6f520a36b00b1129fc49571650782e4c4cc98.
    <DigitalMan> Deuce: I don't think sysops are going to be happy about
    all the config items in SCFG be re-ordered/sorted now

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 11:55:34
    https://gitlab.synchro.net/main/sbbs/-/commit/3350056d0505efa6c0647b6c
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Optimize performance: don't call strlen(prefix) needlessly in loops

    Also, if an empty/blank section prefix is passed to these functions, don't bother calling strnicmp() either.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 21:32:12
    https://gitlab.synchro.net/main/sbbs/-/commit/f0c5d89c6bb6e534fd772aec
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Right, MSVC isn't C99, no inline keyword.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 21:41:10
    https://gitlab.synchro.net/main/sbbs/-/commit/0aa0eb9305c38af17d1789f1
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Try placating Borland some more.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 21:42:22
    https://gitlab.synchro.net/main/sbbs/-/commit/7a36c122e3ebe7f90a395e5d
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Moreland.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 21:44:12
    https://gitlab.synchro.net/main/sbbs/-/commit/2abc7cecd82057989ac6b665
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Snoreland

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 21:52:13
    https://gitlab.synchro.net/main/sbbs/-/commit/a3625e0b9fad76ff938f0757
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Maybe __cdecl works here?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, September 29, 2025 21:55:32
    https://gitlab.synchro.net/main/sbbs/-/commit/45568d13ac9b8b5c47d7bc0e
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Oh, I need to define this myself.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, September 30, 2025 10:41:51
    https://gitlab.synchro.net/main/sbbs/-/commit/9848a07a9f84ab3a6550f87e
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix valid Coverity issues.

    There's still two that are weird and I think is just Coverity
    halucination that I need to dig into a bit harder.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, September 30, 2025 10:49:56
    https://gitlab.synchro.net/main/sbbs/-/commit/925310cf3e656e5fc64890bf
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix the pipes.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, September 30, 2025 10:59:03
    https://gitlab.synchro.net/main/sbbs/-/commit/4929df3cfb1cdc661fd3b9bb
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix Coverity whinging

    Instead of a char we take the address of, make it a single-element
    array of char we pass by value (ie: the address of it).

    Same same, but Coverity should like it better.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, October 01, 2025 20:19:50
    https://gitlab.synchro.net/main/sbbs/-/commit/13f7b0440c884dff072c02f7
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix Coverity fixes.

    Both of them actually worked and prevented the issue, but Coverity
    didn't know that.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, October 02, 2025 11:48:37
    https://gitlab.synchro.net/main/sbbs/-/commit/704a50ccdac528ec8389c6d4
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix warning

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Saturday, October 04, 2025 22:19:48
    https://gitlab.synchro.net/main/sbbs/-/commit/2fdb81f848788709c28e88ff
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Make all ini file read function support the same max length, now 2048 bytes

    INI_MAX_LINE_LEN used to be defined as 2048, but that includes the NUL terminator, so effectively 2047 bytes per line were supported in all the
    ini functions *except* iniReadFile(), which supported 2048 chars per line.

    Now all the ini functions should agree: 2048 is the max chars per line
    because INI_MAX_LINE_LEN is now defined as 2049.

    I figured this was a better solution than reducing the line lengths supported by iniReadFile().

    Fix for issue #982

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, October 05, 2025 17:42:39
    https://gitlab.synchro.net/main/sbbs/-/commit/0a49d7b77ba2458e7dc95bf7
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fixes for a couple Cryptlib issues

    Stream ciphers can be detected as having a blocksize of 1.

    The return value of CRYPT_CTXINFO_IVSIZE is simply the block size,
    which in the case of ChaCha20 is wildly incorrect, so we simply
    can't use that attribute. Instead, store the IV size at the start
    of the IV itself.

    WARNING: THIS CHANGE MAKES THE NEW CODE UNABLE TO DECRYPT A FILE
    ENCRYPTED WITH THE OLD CODE. DECRYPT YOUR LIST BEFORE UPGRADING!

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sunday, October 05, 2025 18:05:12
    https://gitlab.synchro.net/main/sbbs/-/commit/a707bf59e824e9495b5d9a11
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Revert "Make all ini file read function support the same max length, now 2048 bytes"

    This reverts commit 2fdb81f848788709c28e88ff6a1d48152ee57d4c.

    See issue #982 for details

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, October 05, 2025 18:24:11
    https://gitlab.synchro.net/main/sbbs/-/commit/5a4fea78858968999f914c40
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Actually check the result of cryptEncrypt() for IV

    We were grabbing the IV before checking the result of cryptEncrypt(),
    which means if it failed, we would potentially wander off into weirdness.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, October 06, 2025 07:33:37
    https://gitlab.synchro.net/main/sbbs/-/commit/c14b591b57877d8f57ce2ab0
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Be explcit about key derevation parameters.

    Specifically, use SHA-2 with 50,000 iterations.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, October 06, 2025 15:47:34
    https://gitlab.synchro.net/main/sbbs/-/commit/86c7a4abc16970072fd362da
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix non-cryptlib encrypted wrappers

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, October 07, 2025 19:44:22
    https://gitlab.synchro.net/main/sbbs/-/commit/030b4a1acfa14b48e78e94b7
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Fix Coverity issues

    Mostly errors in error handling.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net