unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 04a2a2797116426ebac05b64473f2256fcddb99e 819 bytes (raw)
name: gnu/packages/patches/cool-retro-term-fix-array-size.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
From c91d7ae5dbb00c8392a9f93283dc56c3e296cccd Mon Sep 17 00:00:00 2001
From: Petter <petter@mykolab.ch>
Date: Thu, 27 Apr 2017 20:19:21 +0200
Subject: [PATCH] Fix size of the array passed to memset()

---
 qmltermwidget/lib/History.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qmltermwidget/lib/History.cpp b/qmltermwidget/lib/History.cpp
index 0f9c13f..ab6f7be 100644
--- a/qmltermwidget/lib/History.cpp
+++ b/qmltermwidget/lib/History.cpp
@@ -515,7 +515,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count)
   // put cells in block's data
   assert((count * sizeof(Character)) < ENTRIES);
 
-  memset(b->data, 0, ENTRIES);
+  memset(b->data, 0, sizeof(b->data));
 
   memcpy(b->data, a, count * sizeof(Character));
   b->size = count * sizeof(Character);
-- 
2.12.2


debug log:

solving 04a2a2797 ...
found 04a2a2797 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).