Python, Linux, and the setuid bit

John Gordon gordon at panix.com
Mon Apr 14 17:55:42 EDT 2014


In <mailman.9260.1397511440.18130.python-list at python.org> Ethan Furman <ethan at stoneleaf.us> writes:

>          fprintf(stderr, "Could not allocate %d bytes.  errno=%d\n",
>                  size, errno);

%d is not the correct specifier for printing objects of type size_t.

>      char **envp_read;
>      char **envp_write;

>      if (envp_write < envp_read)
>      {
>          memset(envp_write, 0, ((unsigned int) envp_read -
>                                 (unsigned int) envp_write));
>      }

I think it's complaining about casting the char ** objects to unsigned int.

-- 
John Gordon         Imagine what it must be like for a real medical doctor to
gordon at panix.com    watch 'House', or a real serial killer to watch 'Dexter'.




More information about the Python-list mailing list