The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
27 views

Which 'InputStream' subtype is used by 'Socket' type object here?

In the below server socket program, byte stream object is used to read data from client, as mentioned - InputStream in = socket.getInputStream(); public class SingleThreadTCPServer{ ...
1
vote
1answer
36 views

Query on java I/O BufferedOutputStream write() method

Below is the code that is written using byte stream non-buffer class FileInputStream and FileOutputStream with the usage of explicit user buffers. public class FileCopyUserBuffer{ public static ...
0
votes
1answer
66 views

design for buffering or queuing data streams to replace database

We have a system (ms stack, .net, sql) that receives data from thousands of remote devices (several independent readings/min). We currently save all the data to a db as it arrives and a second service ...
-1
votes
1answer
79 views

Buffer-overflow vulnerabilities that a static code analyser won't pick up [closed]

I'll use FlawFinder in this example. FlawFinder is a static code "analyser" tool that examines C/C++ source files and outputs warnings/hits if a vulnerability was identified. The way it does this is ...
1
vote
2answers
381 views

Which is better: for valid buffer length?

This is a basic question. But, I think understanding this would be helpful to play with buffers in 'C'. Thanks. Scenario Just a sample snippet char *test_buff = (char *) malloc(512); //allocate 512 ...
2
votes
3answers
118 views

Efficiently “moving” data upward through a communication stack

I have implemented an application protocol stack that moves an incoming stream of data upward through several layers, as follows: copies a TCP segment from an OS buffer to my_buffer. after ...
2
votes
4answers
2k views

Is using a bigger buffer useful?

I use buffer for quite a long time when I need to copy a stream or read a file. And every time I set my buffer size to 2048 or 1024, but from my point of view a buffer is like a "bucket" which ...
21
votes
9answers
2k views

Why is it so difficult to make C less prone to buffer overflows?

I'm doing a course in college, where one of the labs is to perform buffer overflow exploits on code they give us. This ranges from simple exploits like changing the return address for a function on a ...
4
votes
2answers
427 views

Data Structures: What are some common examples of problems where “buffers” come into action?

I was just wondering if there were some "standard" examples that everyone uses as a basis for explaining the nature of a problem that requires the use of a buffer. What are some well-known problems in ...