Skip to content

Commit

Permalink
s3/swat: use strlcat instead of strncat to fix build on old Linux dis…
Browse files Browse the repository at this point in the history
…tros

SLES 9's glibc for example had weird macros where the use of strncat resulted
in the use of strcat which we don't allow.

Signed-off-by: Stefan Metzmacher <[email protected]>

Autobuild-User: Björn Jacke <[email protected]>
Autobuild-Date: Thu Aug  4 17:50:24 CEST 2011 on sn-devel-104
(cherry picked from commit d3b4d75)

Fix bug #8362 (build issue on old glibc systems).
(cherry picked from commit 87fa72a)
(cherry picked from commit 552ccc6)
  • Loading branch information
Björn Jacke authored and kseeger committed Aug 9, 2011
1 parent ac5d8c0 commit b941edf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source3/web/swat.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void get_xsrf_token(const char *username, const char *pass,
char tmp[3];

snprintf(tmp, sizeof(tmp), "%02x", token[i]);
strncat(token_str, tmp, sizeof(tmp));
strlcat(token_str, tmp, sizeof(tmp));
}
}

Expand Down

0 comments on commit b941edf

Please sign in to comment.