We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc437c1 commit 4fb29eeCopy full SHA for 4fb29ee
sftp-common.c
@@ -1,4 +1,4 @@
1
-/* $OpenBSD: sftp-common.c,v 1.33 2022/09/19 10:41:58 djm Exp $ */
+/* $OpenBSD: sftp-common.c,v 1.34 2023/03/31 04:00:37 djm Exp $ */
2
/*
3
* Copyright (c) 2001 Markus Friedl. All rights reserved.
4
* Copyright (c) 2001 Damien Miller. All rights reserved.
@@ -137,6 +137,8 @@ decode_attrib(struct sshbuf *b, Attrib *a)
137
138
if ((r = sshbuf_get_u32(b, &count)) != 0)
139
return r;
140
+ if (count > 0x100000)
141
+ return SSH_ERR_INVALID_FORMAT;
142
for (i = 0; i < count; i++) {
143
if ((r = sshbuf_get_cstring(b, &type, NULL)) != 0 ||
144
(r = sshbuf_get_string(b, &data, &dlen)) != 0)
0 commit comments