emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql 374726060d 385/427: Fix buffer struct allocation s


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 374726060d 385/427: Fix buffer struct allocation size (fixes #91)
Date: Tue, 13 Dec 2022 03:00:14 -0500 (EST)

branch: elpa/emacsql
commit 374726060d74df0e2bcb9d0355ff41e2c400ed30
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Fix buffer struct allocation size (fixes #91)
    
    Thanks to Sean Devlin for finding this.
---
 sqlite/emacsql.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sqlite/emacsql.c b/sqlite/emacsql.c
index 89cb144bd8..5c5c0f7eb8 100644
--- a/sqlite/emacsql.c
+++ b/sqlite/emacsql.c
@@ -42,7 +42,7 @@ typedef struct {
 } buffer;
 
 buffer* buffer_create() {
-    buffer *buffer = malloc(sizeof(buffer));
+    buffer *buffer = malloc(sizeof(*buffer));
     buffer->size = 4096;
     buffer->buffer = malloc(buffer->size * sizeof(char));
     return buffer;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]