Sponsored Content
Full Discussion: c calling conventions
Top Forums Programming c calling conventions Post 302432005 by jasondj on Wednesday 23rd of June 2010 12:17:50 PM
Old 06-23-2010
There are some security issues that can also arise if a user is intimately familiar with how parameters are pushed on to the stack. Buffer overflow attacks, stack smashing, and heap smashing are all common ways to attack vulnerable code. Additionally, format string issues might allow a user to view what is on the stack. Imagine if you wrote a C program that takes user input and prints back what the user typed. Now imagine what would happen if the user typed "%x%x%x%x%x%x..." it would essentially print whats on the stack in hex format.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Calling a script from another

Hi, I have 2 scripts, one is the .profile and the other is a SID selector for Oracle Databases. But when I call one from the other, even though it seems to have worked, it doesn't. Can anyone help?? ******************* .profile********************** #!/bin/ksh .... (5 Replies)
Discussion started by: dnkansah
5 Replies

2. Shell Programming and Scripting

Get Calling File

OK, I'm very new to shell scripting, and I'm trying to write a (very) simple wrapper for sendmail that outputs all the arguments as well as the file that called sendmail to an output file which can later be looked over. Is it possible to get a file's name and path that called a script? (0 Replies)
Discussion started by: ghstber
0 Replies

3. UNIX for Advanced & Expert Users

Naming conventions for shared libraries in Linux

Hello, I'm wondering what is the naming conventions for *.so shared libraries in linux. For example, a library in /lib, say libcrypt-2.7.so has a symbolic link called libcrypt.so.1 pointing to it, yet libncursesw.so.5.6 has a symbolic link called libncursesw.so.5 pointing to it. What is the... (2 Replies)
Discussion started by: neked
2 Replies

4. Solaris

A query on Disk naming conventions in Solaris.

These are findings by me with my little experience with Solaris 10. Please correct me if wrong.. In x86 systems with ide hard disk: c= controller d=disk s=slice 1.Here controller c0 means the primary ide controller ide0. controller c1 means the secondary ide controller ide1. ... (5 Replies)
Discussion started by: saagar
5 Replies

5. UNIX for Dummies Questions & Answers

CSS coding conventions checker

I would like to use an automated checker for adherence to CSS coding conventions. I have browsed the web, but no tool I came across checks for coding conventions, only syntax. Here is a general list of requirements: - Style definitions should be separated by one blank line - Indentation is 2... (0 Replies)
Discussion started by: figaro
0 Replies

6. UNIX for Dummies Questions & Answers

question about man font conventions

i was viewing the gawk's man file,checked the man faqs,didnt find anything about the char "e" meaning .TP .B \e` matches the empty string at the beginning of a buffer (string). .TP .B \e' matches the empty string at the end of a buffer.after convention,it should looks like thie \` ... (2 Replies)
Discussion started by: b33713
2 Replies

7. UNIX for Dummies Questions & Answers

Typographic conventions in bash 4.2

is there a typographic convention that is followed in the man pages. where could a description be found. at this time i am in man stty and the author uses upper case in some places. and my brain is just burning to a fizzle while studying a book on bash and trying to stay in scope of the... (1 Reply)
Discussion started by: cowLips
1 Replies

8. Shell Programming and Scripting

How does calling it .sh help?

Hi. I have been running some scripts ok with no extension on the name, and they work fine. What difference does it make if I call them whatever.sh? And I have some scripts starting #!/bin/bash - which debian recognises as shell scritps, even without the .sh ending - and some which don't. I'm sure... (8 Replies)
Discussion started by: triplemaya
8 Replies

9. Cybersecurity

Proper naming conventions

Hey guys, not sure should I post it here or in 'What is on Your Mind?' I'm discussing usage of DSL (domain specific language) in security tools with my colleagues. We haven't been able to reach an agreement over naming conventions. There are many tools using DSL: splunk, sumologic,... (2 Replies)
Discussion started by: Tobby P
2 Replies

10. Linux

UNIX Utility Development Conventions?

I'm slowly hacking away at a zsh script that shows some promise as a command line tool. I want to learn more about the conventions regarding command line tool development in Unix (and/or macOS), but don't really know where to look for this information. What is the correct way, or convention, to... (2 Replies)
Discussion started by: MonilGomes
2 Replies
DC(1)							      General Commands Manual							     DC(1)

NAME
dc - desk calculator SYNOPSIS
dc [ file ] DESCRIPTION
Dc is an arbitrary precision arithmetic package. Ordinarily it operates on decimal integers, but one may specify an input base, output base, and a number of fractional digits to be maintained. The overall structure of dc is a stacking (reverse Polish) calculator. If an argument is given, input is taken from that file until its end, then from the standard input. The following constructions are recognized: number The value of the number is pushed on the stack. A number is an unbroken string of the digits 0-9. It may be preceded by an under- score _ to input a negative number. Numbers may contain decimal points. + - / * % ^ The top two values on the stack are added (+), subtracted (-), multiplied (*), divided (/), remaindered (%), or exponentiated (^). The two entries are popped off the stack; the result is pushed on the stack in their place. Any fractional part of an exponent is ignored. sx The top of the stack is popped and stored into a register named x, where x may be any character. If the s is capitalized, x is treated as a stack and the value is pushed on it. lx The value in register x is pushed on the stack. The register x is not altered. All registers start with zero value. If the l is capitalized, register x is treated as a stack and its top value is popped onto the main stack. d The top value on the stack is duplicated. p The top value on the stack is printed. The top value remains unchanged. P interprets the top of the stack as an ascii string, removes it, and prints it. f All values on the stack and in registers are printed. q exits the program. If executing a string, the recursion level is popped by two. If q is capitalized, the top value on the stack is popped and the string execution level is popped by that value. x treats the top element of the stack as a character string and executes it as a string of dc commands. X replaces the number on the top of the stack with its scale factor. [ ... ] puts the bracketed ascii string onto the top of the stack. <x >x =x The top two elements of the stack are popped and compared. Register x is executed if they obey the stated relation. v replaces the top element on the stack by its square root. Any existing fractional part of the argument is taken into account, but otherwise the scale factor is ignored. ! interprets the rest of the line as a UNIX command. c All values on the stack are popped. i The top value on the stack is popped and used as the number radix for further input. I pushes the input base on the top of the stack. o The top value on the stack is popped and used as the number radix for further output. O pushes the output base on the top of the stack. k the top of the stack is popped, and that value is used as a non-negative scale factor: the appropriate number of places are printed on output, and maintained during multiplication, division, and exponentiation. The interaction of scale factor, input base, and out- put base will be reasonable if all are changed together. z The stack level is pushed onto the stack. Z replaces the number on the top of the stack with its length. ? A line of input is taken from the input source (usually the terminal) and executed. ; : are used by bc for array operations. An example which prints the first ten values of n! is [la1+dsa*pla10>y]sy 0sa1 lyx SEE ALSO
bc(1), which is a preprocessor for dc providing infix notation and a C-like syntax which implements functions and reasonable control struc- tures for programs. DIAGNOSTICS
`x is unimplemented' where x is an octal number. `stack empty' for not enough elements on the stack to do what was asked. `Out of space' when the free list is exhausted (too many digits). `Out of headers' for too many numbers being kept around. `Out of pushdown' for too many items on the stack. `Nesting Depth' for too many levels of nested execution. 7th Edition April 29, 1985 DC(1)
All times are GMT -4. The time now is 07:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy