Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Arlen lt patches #321

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Add Arlen lt patches #321

wants to merge 27 commits into from

Conversation

Wolf3s
Copy link
Contributor

@Wolf3s Wolf3s commented Feb 11, 2024

See the commits for more informations.

Wolf3s and others added 11 commits February 10, 2024 14:26
"smb2_get_negotiate_version" and "smb2_get_negotiate_version".

Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
 smb2_get_offset and smb2_get_file_size

Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
  and the implicit definition of 'smb2_file_id'

Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>
Co-Authored-By: HAOZHE LI <Arlen-lt@protonmail.com>

cb_data->ptr = &rl_data;
cb_data->ptr = &rl_data;

Check warning

Code scanning / CodeQL

Local variable address stored in non-local memory Warning

A stack address (
source
) may be assigned to a non-local variable.
lib/sync.c Fixed Show fixed Hide fixed
@@ -34,7 +34,7 @@

#include "smb2.h"

const char *nterror_to_str(uint32_t status) {
const char * SMB2APIENTRY nterror_to_str(uint32_t status) {

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 1022 lines.
@Wolf3s Wolf3s marked this pull request as ready for review February 13, 2024 15:58
@Wolf3s
Copy link
Contributor Author

Wolf3s commented Feb 13, 2024

@sahlberg the PR is ready to go.

@Wolf3s
Copy link
Contributor Author

Wolf3s commented Feb 13, 2024

Note: there's function which is:

void SMB2APIENTRY smb2_set_version(struct smb2_context *smb2,
                      enum smb2_negotiate_version version)
{
    smb2->version = version;
}

and @Arlen-LT has added:

void SMB2APIENTRY smb2_set_negotiate_version(struct smb2_context* smb2, enum smb2_negotiate_version version)
{
    smb2->version = version;
}

enum smb2_negotiate_version SMB2APIENTRY smb2_get_negotiate_version(struct smb2_context* smb2)
{
    return smb2->version;
}

enum smb2_negotiate_version SMB2APIENTRY smb2_get_dialect_version(struct smb2_context* smb2)
{
    return smb2->dialect;
}

Which is the same of the other one but with plus, However i kept the other one for backwards compatibility maybe in the next-gen smb2 this smb2_set_version should be removed.

@sahlberg
Copy link
Owner

Can you update this and resolve the conflicts?

@Wolf3s
Copy link
Contributor Author

Wolf3s commented Mar 29, 2024

Can you update this and resolve the conflicts?

Yes.

@Wolf3s
Copy link
Contributor Author

Wolf3s commented Mar 29, 2024

@sahlberg i solved the conflict you can merge now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants