8 Topics
|
|
I have this simple program in which I want to concatenate two char pointers using memcpy, but I get access violation writing location on the memcpy line. Why is this happening and what could be done to make it work? Thanks. char *first = new char[20], *second="world!"; printf("first: "); scanf("%s",&first); … |
|
What is the maximum buffer size allowed in memecpy() function in c, I am using GCC compiler,32-bit system, What is the affecting factor for memcpy failure? ->Alignment issue? ->Size? however the buffer size 256bytes not working, tried 160 bytes copy which fits our requirement |
|
Hi. Nice to meet you. I'd like to know if I'm doing the allocation of memory from data to new_data correctly and why new_data only has one value since the memory of data was copied before to new_data. set size: 10 set[000] = 000 set[001] = 001 set[002] = 002 … |
|
I used `memcpy` to copy the contents of one pointer to another pointer assigned to new memory. Later in the program I get runtime errors as if I were attempting to operate on a pointer pointing to nothing. While debugging, I saw that the original and the the copied pointer … |
|
I have been working on a few projects and needed a method similar to pythons string.split(). I decided to make a reusable piece of code and export it as a .dll, the code is below: std::vector<std::string> Editor::StringHandler::Split(std::string data, std::string tokens) std::vector<std::string> returnList; std::string temp=""; bool found=false; for (auto i : … |
|
Hi all, I am currently extending a large C project with an own extension and I am stuck in a pointer/array/struct problem: The project offers a struct of this structure [CODE]struct ip_addr{ unsigned int af; /* address family: AF_INET6 or AF_INET */ unsigned int len; /* address len, 16 or … |
|
I am writing a video program, everything works fine except I am often (ie most times, but not [I]every [/I]time) getting the following error: Unhandled exception at 0x6076fde0 (msvcr90d.dll) in javaw.exe: 0xC0000005: Access violation reading location 0x0a450020. I have tracked it down to this function: [CODE]//fill the buffer from data … |
|
Hi, the code analysis tool we use gives below warning for the functions in which memset / memcpy is used "The function writes outside the bounds of dup on line 303, which could corrupt data, cause the program to crash, or lead to the execution of malicious code." could someone … |
The End.