aboutsummaryrefslogtreecommitdiff
path: root/src/cli/stasis_indexer/callbacks.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2025-11-10 14:41:21 -0500
committerGitHub <noreply@github.com>2025-11-10 14:41:21 -0500
commitcf50be9ef96fd8011fbd45321b4c454470112cf4 (patch)
treed0586dd5cfc703586752dfc318a068a31539850a /src/cli/stasis_indexer/callbacks.c
parentd90493618ce34a732c5411d1670be57d4dd9db4e (diff)
parentb999413700231b5d922c91addef7c080fd289b30 (diff)
downloadstasis-cf50be9ef96fd8011fbd45321b4c454470112cf4.tar.gz
Merge pull request #119 from jhunkeler/indexer-buffer-overlow
Indexer buffer overflow and leak(s)
Diffstat (limited to 'src/cli/stasis_indexer/callbacks.c')
-rw-r--r--src/cli/stasis_indexer/callbacks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/stasis_indexer/callbacks.c b/src/cli/stasis_indexer/callbacks.c
index 603aef9..20674f0 100644
--- a/src/cli/stasis_indexer/callbacks.c
+++ b/src/cli/stasis_indexer/callbacks.c
@@ -7,9 +7,9 @@
// qsort callback to sort delivery contexts by compact python version
int callback_sort_deliveries_cmpfn(const void *a, const void *b) {
- const struct Delivery *delivery1 = (struct Delivery *) a;
+ const struct Delivery *delivery1 = *(struct Delivery **) a;
const size_t delivery1_python = strtoul(delivery1->meta.python_compact, NULL, 10);
- const struct Delivery *delivery2 = (struct Delivery *) b;
+ const struct Delivery *delivery2 = *(struct Delivery **) b;
const size_t delivery2_python = strtoul(delivery2->meta.python_compact, NULL, 10);
if (delivery2_python > delivery1_python) {