Sponsored Content
Top Forums Programming Is there a limit for a code line length in C? Post 302431669 by alex_5161 on Tuesday 22nd of June 2010 01:32:07 PM
Old 06-22-2010
Quote:
Originally Posted by Corona688
Code lines don't even exist after the program is compiled, so it causing crashes during debugging doesn't make much sense. If you're exceeding some limit, the compiler should warn you.
Yea, it sounds completely right!.. you take-off from me one more chance to find a problem Smilie - just kidding..
Appreciate you oppinion!

---------- Post updated at 12:32 PM ---------- Previous update was at 11:46 AM ----------

Quote:
Originally Posted by Corona688
...

What you're describing sounds more like a buffer overflow. Writing past the end of an array on the stack can mangle other local variables, causing behavior like you describe. Moving around lines of code may change what gets mangled or at least when, changing the behavior.
It is what I thinkling about from first time that problem appeared - writing over the line size or to some undeclared array's element, but, revuewing over and over again the processing flow could not catch anything like that!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep line length limit

Hi Friends, I am having a funny problem with grep. When I run grep 'expr' file.txt things work fine. But when try to get the line number using the -n option, i.e, grep -n 'expr' file.txt I get a message, "grep: 0652-226 Maximum line length of 2048 exceeded." If the line has more than... (3 Replies)
Discussion started by: hnhegde
3 Replies

2. AIX

Is the Length of User ID for AIX Limit to 8 Characters?

Hi, I'm using AIX version 5.3 currently. I'm trying to create a user id, e.g. andyleong, which the system prompted the length is too long. 1. I would like to know is that the length of user id is limited to maximum 8 characters for AIX. 2. Is it apply to all versions of AIX? If no... (2 Replies)
Discussion started by: meihua_t
2 Replies

3. UNIX for Dummies Questions & Answers

limit of command length

Hi! Can you please help me with one question? Does rexec command have some limitation of the length of the deliveded cmd? Thanks in advance, Anta (2 Replies)
Discussion started by: Anta
2 Replies

4. Shell Programming and Scripting

Deleting Characters at specific position in a line if the line is certain length

I've got a file that would have lines similar to: 12345678 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 23456781 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 34567812 x.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 45678123 x.00 xx.00 xx.00 xx.00 xx.00 x.00 xxx.00 xx.00 xx.00 xx.00 xx.00... (10 Replies)
Discussion started by: Cailet
10 Replies

5. Cybersecurity

~ IPTables : Limit Incoming UDP Packets With a Certain Length ~

Hello, I am currently trying to limit incoming UDP length 20 packets on a per IP basis to 5 a second using IPTables on a Linux machine (CentOS 5.2). Basically, if an IP is sending more than 5 length 20 UDP packet a second to the local machine, I would like the machine to drop the excess... (1 Reply)
Discussion started by: tomboy123
1 Replies

6. Shell Programming and Scripting

AWK limit for (length) function?

I am trying to use the following code: awk '{s=$0;if(length(s) < 750){getline; s=s " " $0}printf("%s\n",s)}' filename but an error shows that 'awk' is too long. Is there a limit to the awk length function? and what could be an alternate solution for long fixed width records? The code... (3 Replies)
Discussion started by: CKT_newbie88
3 Replies

7. Shell Programming and Scripting

perl file, one line code include "length, rindex, substr", slow

Hi Everyone, # cat a.txt a;b;c;64O a;b;c;d;ee;f # cat a.pl #!/usr/bin/perl use strict; use warnings; my $tmp3 = ",,a,,b,,c,,d,,e,,f,,"; open(my $FA, "a.txt") or die "$!"; while(<$FA>) { chomp; my @tmp=split(/\;/, $_); if ( ($tmp =~ m/^(64O)/i) || ($tmp... (3 Replies)
Discussion started by: jimmy_y
3 Replies

8. Programming

Limit line for perl

Hey guys, can help me out with this? How do i limit output for xml to 50 character? i tried *below* but doesnt work, it still print more than 50 characters. Thanks in advance printf "%-50s", "$testline\n"; (4 Replies)
Discussion started by: Nick1097
4 Replies

9. Shell Programming and Scripting

Check for length which exceeds specified length in a line

Hi, I have a issue, I need to loop through a comma delimited file and check for the length which exceeds specified length , if Yes truncate the string. But my problem is , I do not have to check for all the fields and the field lenght is not same for all the fields. For ex: Say my line... (9 Replies)
Discussion started by: rashmisb
9 Replies

10. Shell Programming and Scripting

Limit string length with sed

Hi. I'm trying to learn sed. I want to limit the length of a string. I tried this: sed -n 's/^\(...........................\).*/\1/p' textfile.txt This works fine, but how do I give it as a range rather than putting a hundred dots? I'd like to limit the number of characters to 144 for... (3 Replies)
Discussion started by: troglodytes
3 Replies
PPSRATECHECK(9) 					   BSD Kernel Developer's Manual					   PPSRATECHECK(9)

NAME
ppsratecheck -- function to help implement rate-limited actions SYNOPSIS
#include <sys/time.h> int ppsratecheck(struct timeval *lasttime, int *curpps, int maxpps); DESCRIPTION
The ppsratecheck() function provides easy way to perform packet-per-sec, or event-per-sec, rate limitation. The motivation for implementing ppsratecheck() was to provide a mechanism that could be used to add rate limitation to network packet output. For certain network packets, we may want to impose rate limitation, to avoid denial-of-service attack possibilities. maxpps specifies maximum permitted packets, or events, per second. If ppsratecheck() is called more than maxpps times in a given one second period, the function will return 0, indicating that we exceeded the limit. If we are below the limit, the function will return 1. If maxpps is set to 0, the function will always return 0 (no packets/events are permitted). Negative maxpps indicates that rate limitation is dis- abled, and ppsratecheck will always return 1. curpps and lasttime are used to maintain the number of recent calls. curpps will be incremented every time ppsratecheck() is called, and will be reset whenever necessary. SEE ALSO
log(9), printf(9), ratecheck(9), time_second(9) HISTORY
The ppsratecheck() function appeared in NetBSD 1.5. BSD
August 3, 2000 BSD
All times are GMT -4. The time now is 10:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy