News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Recent posts

#71
Feature requests / Re: Enhanced snippets suggesti...
Last post by Pelle - May 03, 2026, 09:33:48 PM
Quote from: ander_cc on April 27, 2026, 03:38:57 AMIf I want to use "Surround by" and "Comment" and "No comment", I should select a line first.
Could you add a "auto select current line" feature?
Why? I don't see the point.

Quote from: ander_cc on April 27, 2026, 03:38:57 AMCould you add some shortcuts for "Surround by" and "Comment" and "No comment" ?
"Tools" -> "Customize" -> "Keyboard" --> "Source" is a good start.

Quote from: ander_cc on April 27, 2026, 03:38:57 AMI want to use $0 twice or more. Could you add it?
You cannot view this attachment.
Again, why? You can only surround something once...

#72
Bug reports / Re: Undefined label issue
Last post by Pelle - May 03, 2026, 09:26:37 PM
IMO, this is a bit like asking for trouble.
I may do something about it some day, but I will be in no hurry to do so...
#73
Bug reports / Re: snippets diglog is small
Last post by Pelle - May 03, 2026, 09:22:45 PM
I will try to reproduce this. Right now I can't.
#74
General discussions / Re: Legacy header files
Last post by John Z - May 03, 2026, 12:50:44 PM
About the vulnerability -

From https://nvd.nist.gov/vuln/detail/CVE-2025-6965

"There exists a vulnerability in SQLite versions before 3.50.2 where the number of aggregate terms could exceed the number of columns available. This could lead to a memory corruption issue. We recommend upgrading to version 3.50.2 or above."

Then checking winsqlite3.dll in both System32 and SysWOW64 they were updated 1/18/2026 3:53pm to version 3.51.1 so I think means the issue no longer exists, and the dll's are safe to use.

John Z
#75
Assembly discussions / Self modifying code example
Last post by Vortex - May 03, 2026, 12:37:58 PM
Hello,

A simple example of self modifying code. The procedure in the virtual address space is modified : the sub instruction replaced by add.

.386
.model flat,stdcall
option casemap:none

include     SMCtest.inc

.data

str1        db '80 + 20 = %u',0

.code

start:

    call    main
    invoke  ExitProcess,0

main PROC USES esi edi ebx

LOCAL pMem:DWORD

    invoke  VirtualAlloc,0,4096,\
            MEM_COMMIT or MEM_RESERVE,\
            PAGE_EXECUTE_READWRITE

    mov     pMem,eax
    mov     edi,eax
    mov     esi,OFFSET Calculate

    mov     ecx,ProcLen
    rep     movsb   ; Copy the procedure Calculate
                    ; to virtual address space

    lea     ecx,[eax+4]

                    ; Modify the procedure

    mov     BYTE PTR [ecx],_ADD

    push    80
    push    20
    call    eax

    invoke  printf,ADDR str1,eax

    invoke  VirtualFree,pMem,0,MEM_RELEASE
    ret

main ENDP

OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE

Calculate PROC a:DWORD,b:DWORD

    mov     eax,DWORD PTR [esp+8]
    sub     eax,DWORD PTR [esp+4]
    retn    2*4

Calculate ENDP

OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDef

END start
#76
General discussions / Re: Legacy header files
Last post by TimoVJL - May 03, 2026, 12:25:33 PM
Windows 11, 3.43.2.0
After updates, versio is 3.51.1
#77
General discussions / Re: Legacy header files
Last post by John Z - May 03, 2026, 12:08:49 PM
Thanks Robert!

This is very good to know. 
Personally I use the SQLite3 3.33.0 distribution. https://sqlite.org/
I see an update to 3.53 so I'm behind.

Get the C source code as an amalgamation, version 3.53.0. then just add 4 files to the program.
https://sqlite.org/download.html

John Z
#78
Bug reports / Undefined label issue
Last post by Vortex - May 03, 2026, 11:34:41 AM
Poasm Version 14.10.0 reports an error message while assembling the code below :

.386
.model flat,stdcall
option casemap:none

.code

    call    main
    ret

main PROC

    mov     eax,OFFSET sample
    ret

main ENDP

sample:

    db      'This is a test.',0

END

\PellesC\bin\poasm.exe /AIA32 sample.asm
sample.asm(12): error: Symbol 'sample' is undefined.
sample.asm(12): error: Symbol 'main.sample' is undefined.

This issue happens when a label is defined after a procedure.

#79
General discussions / Re: Legacy header files
Last post by Robert - May 02, 2026, 11:29:45 PM
Quote from: ander_cc on May 02, 2026, 06:03:06 AMThere are two header files in folder "Include/win/winsqlite/": winsqlite3.h and winsqlite3ext.h.
But no related .lib files are included in folder "Lib".
Is this a deprecated feature?

I suspect that Pelle did not include the .lib files for those .dlls because there was a security vulnerability.

https://learn.microsoft.com/en-us/answers/questions/5591853/vulnerability-in-winsqlite3-dll

#80
General discussions / Re: Legacy header files
Last post by John Z - May 02, 2026, 09:41:01 PM
Hi ander_cc,

A lot of help now 👍👍👍

You can also find the exported functions using:
 C:\Program Files\PellesC\Bin\pope.exe

Attached example shows part of the output for the winsqlite3.dll, copy paste not possible so image is attached.

John Z