check for stpcpy
[rsync.git] / options.c
index 097d7f31d4ce86b99f2663427f57107a67ae20f3..fd674754cd5e4992b05050d69c092cf207979c91 100644 (file)
--- a/options.c
+++ b/options.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 1998-2001 Andrew Tridgell <tridge@samba.org>
  * Copyright (C) 2000, 2001, 2002 Martin Pool <mbp@samba.org>
- * Copyright (C) 2002-2022 Wayne Davison
+ * Copyright (C) 2002-2023 Wayne Davison
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1946,6 +1946,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                        goto cleanup;
                max_alloc = size;
        }
+       if (!max_alloc)
+               max_alloc = SIZE_MAX;
 
        if (old_style_args < 0) {
                if (!am_server && protect_args <= 0 && (arg = getenv("RSYNC_OLD_ARGS")) != NULL && *arg) {