[PATCH 3/3] compositor: dump command line options

Bill Spitzak spitzak at gmail.com
Mon Mar 19 21:36:30 PDT 2012


On 03/19/2012 08:57 PM, Tiago Vignatti wrote:

> + argv[argc] = argv[argc - 1] + strlen(argv[argc - 1]) +1;
> + strcpy(argv[argc], "--help");

You want just:

   argv[argc] = "--help";

You do not need to copy any string anywhere, and certainly the above is 
not in any way guaranteed to give you some memory you can write to.


More information about the wayland-devel mailing list