Ticket #67482: a17707681f35b73a5ecd8ca60a5ff950c790df39.patch

File a17707681f35b73a5ecd8ca60a5ff950c790df39.patch, 894 bytes (added by mihkelader, 16 months ago)
  • daemon/ssh-agent/gkd-ssh-agent-service.c

    From a17707681f35b73a5ecd8ca60a5ff950c790df39 Mon Sep 17 00:00:00 2001
    From: Jos Dehaes <jos.dehaes@gmail.com>
    Date: Mon, 14 Mar 2022 13:42:45 +0100
    Subject: [PATCH] #105 fix looping off the end of the operations array
    
    ---
     daemon/ssh-agent/gkd-ssh-agent-service.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/daemon/ssh-agent/gkd-ssh-agent-service.c b/daemon/ssh-agent/gkd-ssh-agent-service.c
    index a9f74ab3..c3e4bb33 100644
    a b handle_request (GkdSshAgentService *self, 
    184184
    185185        /* Decode the operation; on failure, just pass through */
    186186        if (egg_buffer_get_byte (req, 4, NULL, &op) &&
    187             op <= GKD_SSH_OP_MAX && operations[op] != NULL)
     187            op < GKD_SSH_OP_MAX && operations[op] != NULL)
    188188                func = operations[op];
    189189        else
    190190                func = relay_request;