strcat() appends data to a buffer, but getenv() does not return memory to a buffer you can just append data to. You should append data to a buffer that you know fit the data.
But that's beyond what this forum is about. You filed a but against curl that really is a bug in your program this bug entry can be closed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/786012 Title: Curl messes up a directory to download to with a cookies file -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs