Praneeth Sarode
74d1bf51b5
feat(string): add ssh_string_from_data function to create ssh_string from data buffer
...
Signed-off-by: Praneeth Sarode <praneethsarode@gmail.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2025-10-10 14:00:22 +02:00
Praneeth Sarode
95f8cbc7f0
feat(string): add ssh_string_cmp function for comparing ssh_strings
...
Signed-off-by: Praneeth Sarode <praneethsarode@gmail.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2025-07-30 16:06:31 +02:00
Praneeth Sarode
7a2a743a39
fix(string): handle empty string case in ssh_string_copy
...
Signed-off-by: Praneeth Sarode <praneethsarode@gmail.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2025-07-02 13:58:51 +02:00
Jakub Jelen
2eb2af4426
CVE-2025-4878 Initialize pointers where possible
...
This is mostly mechanical change initializing all the pointers I was able to
find with some grep and manual review of sources and examples.
Used the following greps (which yield some false positives though):
git grep " \w* *\* *\w*;$"
git grep " ssh_session \w*;"
git grep " ssh_channel \w*;"
git grep " struct ssh_iterator \*\w*;"
git grep " ssh_bind \w*;"
git grep " ssh_key \w*;"
git grep " ssh_string \w*;"
git grep " ssh_buffer \w*;"
git grep " HMACCTX \w*;"
git grep " SHACTX \w*;"
grep -rinP '^(?!.*=)\s*(?:\w+\s+)*\w+\s*\*\s*\w+\s*;'
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2025-06-23 15:24:30 +02:00
Jakub Jelen
5d27f69494
string: Reformat
...
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2025-06-23 15:24:30 +02:00
Jakub Jelen
b7018c17c7
Fix implicit type conversions and warnings on windows builds
...
The visual studio windows builds spit dozens of lines of warnings
on these.
Signed-off-by: Jakub Jelen <jjelen@redhat.com >
Reviewed-by: Andreas Schneider <asn@cryptomilk.org >
2025-01-03 15:18:53 +01:00
Junda Ai
41e2d17119
Fix multiple spelling and grammar mistakes
...
Signed-off-by: Junda Ai <aijunda29@gmail.com >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2022-05-02 19:05:51 +02:00
Andreas Schneider
f48dcb26e3
string: Don't allow to allocate strings bigger than 256M
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2018-09-04 12:29:20 +02:00
Andreas Schneider
d1f23cd6d8
string: Reformat ssh_string_new()
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Jakub Jelen <jjelen@redhat.com >
2018-09-04 12:29:09 +02:00
Andreas Schneider
c563ed636a
Remove vim modelines from all files
...
If you want modelines use my vim plugin:
https://github.com/cryptomilk/git-modeline.vim
git config --add vim.modeline "ts=4 sw=4 et"
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2018-06-28 08:41:08 +02:00
Andreas Schneider
ebcff9fd63
src: Use explicit_bzero() if available on the platform
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2018-02-12 14:41:27 +01:00
Andreas Schneider
f0ddde4826
Fix config.h includes
...
We need stdlib.h and string.h in priv.h for free() and memset().
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2017-10-28 14:31:37 +02:00
Andreas Schneider
83d3ee7fdb
string: Improve ssh_string_len() to avoid tainted variables
...
CID: #1278978
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
2015-05-04 17:54:01 +02:00
Andreas Schneider
1ddb99c46f
string: Correctly burn the string buffer.
...
Signed-off-by: Andreas Schneider <asn@cryptomilk.org >
Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be >
2014-09-15 20:45:47 +02:00
Andreas Schneider
de9bc1fa41
string: Fix memory leak in ssh_string_to_char().
...
This was probably a mistake by me fixing up a patch after merging.
2012-12-13 19:29:46 +01:00
Xi Wang
5ffb8c7cde
CVE-2012-4562: Fix possible integer overflows.
2012-11-14 17:36:16 +01:00
Andreas Schneider
53008fb5d4
string: Don't compare an array to null.
...
Found by Coverity.
2012-10-12 08:07:01 +02:00
Andreas Schneider
782b2e37c6
build: Fix missing struct in_addr warning.
2012-07-17 18:16:07 +02:00
Andreas Schneider
81017b0fc2
string: Make sure we always have the right byte order.
2011-09-08 19:57:34 +02:00
Andreas Schneider
c1f8b38b78
string: Add ssh_string_get_char().
2011-09-08 16:14:35 +02:00
Andreas Schneider
5581323c2c
string: Use the struct and array for allocating the struct.
2011-09-08 15:50:39 +02:00
Andreas Schneider
3fa801a929
string: Added missing include.
2011-06-06 18:56:15 +02:00
Andreas Schneider
d536cc4f39
string: Added missing errno.
2011-06-06 18:50:39 +02:00
milo
4230509e80
Check for NULL pointers in string.c
2011-02-14 20:23:12 +01:00
Aris Adamantiadis
98221f4e36
Fixed a bunch of smallish bugs
...
http://linuxtesting.org/upstream-tracker/test_results/libssh/current/test_results.html
for a whole list
2010-10-20 14:47:11 +02:00
Andreas Schneider
f7842e3a4b
misc: Rename libssh/ to src/
2010-09-06 14:28:38 +02:00