Skip to content

Commit 6c7d9bb

Browse files
committed
Fix possible corruption of previous pointer in ipp_t linked list (Issue #138)
1 parent f9befd2 commit 6c7d9bb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cups/ipp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// Internet Printing Protocol functions for CUPS.
33
//
4-
// Copyright © 2022-2025 by OpenPrinting.
4+
// Copyright © 2022-2026 by OpenPrinting.
55
// Copyright © 2007-2021 by Apple Inc.
66
// Copyright © 1997-2007 by Easy Software Products, all rights reserved.
77
//
@@ -6080,7 +6080,7 @@ ipp_set_value(ipp_t *ipp, // IO - IPP message
60806080
#endif // !__clang_analyzer__
60816081
DEBUG_printf("4debug_alloc: %p %s %s%s (%d)", (void *)temp, temp->name, temp->num_values > 1 ? "1setOf " : "", ippTagString(temp->value_tag), temp->num_values);
60826082

6083-
if (ipp->current == *attr && ipp->prev)
6083+
if (ipp->current == *attr && ipp->prev && ipp->prev->next == *attr)
60846084
{
60856085
// Use current "previous" pointer...
60866086
prev = ipp->prev;

0 commit comments

Comments
 (0)